mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-10 03:46:09 +00:00
Postman Collection Generator (#15294)
* Add Postman generator * Add Postman generator doc * Remove contact data * Change license data * Add Postman in samples * Add Postman in bin/configs * Commit changed files * Update Postman doc * Correct generator connfiguration * Regenerate docs * Correct javadoc * Use File instead of FileReader * Rename to postman-collection (schema) generator * Commit regenerated files * Improve help and Javadoc * Commit regenerated files
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
# OpenAPI Generator Ignore
|
||||
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
||||
|
||||
# Use this file to prevent files from being overwritten by the generator.
|
||||
# The patterns follow closely to .gitignore or .dockerignore.
|
||||
|
||||
# As an example, the C# client generator defines ApiClient.cs.
|
||||
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
|
||||
#ApiClient.cs
|
||||
|
||||
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
||||
#foo/*/qux
|
||||
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
|
||||
|
||||
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
||||
#foo/**/qux
|
||||
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
||||
|
||||
# You can also negate patterns with an exclamation (!).
|
||||
# For example, you can ignore all files in a docs folder with the file extension .md:
|
||||
#docs/*.md
|
||||
# Then explicitly reverse the ignore rule for a single file:
|
||||
#!docs/README.md
|
||||
@@ -0,0 +1 @@
|
||||
postman.json
|
||||
@@ -0,0 +1 @@
|
||||
6.6.0-SNAPSHOT
|
||||
275
samples/documentation/postman-collection/postman.json
Normal file
275
samples/documentation/postman-collection/postman.json
Normal file
@@ -0,0 +1,275 @@
|
||||
{
|
||||
"info": {
|
||||
"name": "Sample project",
|
||||
"description": {
|
||||
"content": "Sample API Check \"API Key\" ",
|
||||
"type": "text/markdown"
|
||||
},
|
||||
"version": "1.0",
|
||||
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
|
||||
},
|
||||
"item": [
|
||||
{
|
||||
"name": "default",
|
||||
"item": [
|
||||
{
|
||||
"name": "/users/{{userId}} (DEPRECATED)",
|
||||
"description": "Update the information of an existing user.",
|
||||
"item": [
|
||||
{
|
||||
"name": "Update User Information",
|
||||
"request": {
|
||||
"method": "PATCH",
|
||||
"header": [
|
||||
{
|
||||
"key": "Content-Type",
|
||||
"value": "application/json"
|
||||
},
|
||||
{
|
||||
"key": "Accept",
|
||||
"value": "application/json"
|
||||
},
|
||||
{
|
||||
"key": "strCode",
|
||||
"value": "code_one"
|
||||
},
|
||||
{
|
||||
"key": "strCode2",
|
||||
"value": "null"
|
||||
}
|
||||
],
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"firstName\" : \"Rebecca\"\n}",
|
||||
"options": {
|
||||
"raw": {
|
||||
"language": "json"
|
||||
}
|
||||
}
|
||||
},
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/users/{{userId}}",
|
||||
"host": [
|
||||
"{{baseUrl}}"
|
||||
],
|
||||
"path": [
|
||||
"users",
|
||||
"{{userId}}"
|
||||
],
|
||||
"variable": [
|
||||
{
|
||||
"key": "userId",
|
||||
"value": "",
|
||||
"description": "Id of an existing user."
|
||||
}
|
||||
],
|
||||
"query": [
|
||||
]
|
||||
},
|
||||
"description": "Update the information of an existing user."
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "advanced",
|
||||
"item": [
|
||||
{
|
||||
"name": "/users/{{userId}}",
|
||||
"description": "Retrieve the information of the user with the matching user ID.",
|
||||
"item": [
|
||||
{
|
||||
"name": "Get User Info by User ID",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Accept",
|
||||
"value": "application/json"
|
||||
},
|
||||
{
|
||||
"key": "strCode",
|
||||
"value": "code_one"
|
||||
},
|
||||
{
|
||||
"key": "strCode2",
|
||||
"value": "null"
|
||||
}
|
||||
],
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "",
|
||||
"options": {
|
||||
"raw": {
|
||||
"language": "json"
|
||||
}
|
||||
}
|
||||
},
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/users/{{userId}}",
|
||||
"host": [
|
||||
"{{baseUrl}}"
|
||||
],
|
||||
"path": [
|
||||
"users",
|
||||
"{{userId}}"
|
||||
],
|
||||
"variable": [
|
||||
{
|
||||
"key": "userId",
|
||||
"value": "",
|
||||
"description": "Id of an existing user."
|
||||
}
|
||||
],
|
||||
"query": [
|
||||
]
|
||||
},
|
||||
"description": "Retrieve the information of the user with the matching user ID."
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "basic",
|
||||
"item": [
|
||||
{
|
||||
"name": "/users/",
|
||||
"description": "Retrieve the information of the user with the matching user ID.",
|
||||
"item": [
|
||||
{
|
||||
"name": "Get User Info by Query Param",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Accept",
|
||||
"value": "application/json"
|
||||
}
|
||||
],
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "",
|
||||
"options": {
|
||||
"raw": {
|
||||
"language": "json"
|
||||
}
|
||||
}
|
||||
},
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/users/",
|
||||
"host": [
|
||||
"{{baseUrl}}"
|
||||
],
|
||||
"path": [
|
||||
"users"
|
||||
],
|
||||
"variable": [
|
||||
],
|
||||
"query": [
|
||||
{
|
||||
"key": "pUserId",
|
||||
"value": "888"
|
||||
}
|
||||
]
|
||||
},
|
||||
"description": "Retrieve the information of the user with the matching user ID."
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "/user",
|
||||
"description": "Create a new user.",
|
||||
"item": [
|
||||
{
|
||||
"name": "Example request for Get User",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Content-Type",
|
||||
"value": "application/json"
|
||||
},
|
||||
{
|
||||
"key": "Accept",
|
||||
"value": "application/json"
|
||||
}
|
||||
],
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"id\" : 777,\n \"firstName\" : \"Alotta\",\n \"lastName\" : \"Rotta\",\n \"email\" : \"alotta.rotta@gmail.com\",\n \"dateOfBirth\" : \"1997-10-31\",\n \"emailVerified\" : true,\n \"createDate\" : \"2019-08-24\"\n}",
|
||||
"options": {
|
||||
"raw": {
|
||||
"language": "json"
|
||||
}
|
||||
}
|
||||
},
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/user",
|
||||
"host": [
|
||||
"{{baseUrl}}"
|
||||
],
|
||||
"path": [
|
||||
"user"
|
||||
],
|
||||
"variable": [
|
||||
],
|
||||
"query": [
|
||||
]
|
||||
},
|
||||
"description": "Create a new user."
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"auth": {
|
||||
"type": "basic",
|
||||
"basic": [
|
||||
{
|
||||
"key": "username",
|
||||
"value": "{{USERNAME}}",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"key": "password",
|
||||
"value": "{{PASSWORD}}",
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"variable": [
|
||||
{
|
||||
"key": "baseUrl",
|
||||
"value": "http://localhost:{port}/{version}",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"key": "X-API-Key",
|
||||
"value": "",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"key": "version",
|
||||
"value": "v1",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"key": "port",
|
||||
"value": "5000",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"key": "userId",
|
||||
"value": "a",
|
||||
"type": "number"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user