Sample Swagger JSON File

An overview of the fields from the sample Swagger.json file is provided in the following table. For a complete list of all the objects and fields that can be defined in the swagger.json file, refer to https://github.com/OAI/OpenAPI-Specification/blob/OpenAPI.next/versions/3.0.0.md#specification.

Field Name Description
swagger Specifies the Swagger Specification version being used. For example:
"swagger" : "2.0"
info Provides metadata about the API. For example, the Application API version, title, and port type of service.
"info":{  
		"description":"No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)",
		"version":"1.0.0",
		"title":"Process Component API",
		"contact":{  

		}
basePath The base URL of the server. All API endpoints are relative to the base URL. The base URL is of the following format:
scheme://host[:port][/path][parameters]

Some examples are:

http://localhost:9095/v1/plan?ALL_PI_SINGLE_UDF_NAME_IGNORE_EMPTY_PI=true&idsOnly=false&includeItems=false
host The Host of the Service. For example:
"host" : "localhost:9095"
schemes The type of the security scheme supported for authentication. For example:
"schemes" : [ "http" ]
paths

The relative paths to the individual endpoints and their operations. The path is appended to the base URL to construct the full URL.

tags A list of tags applicable for the operation. Tags can be used for logical grouping of operations. For example:
 "tags":[  
		{  
			"name":"ProcessComponentApi",
			"description":"the ProcessComponent API"
		}
	]
description
An explanation of the operation.
 "description" : "description of the method"
operationId Unique string used to identify the operation. For example:
"operationId" : "operationId of the method"
produces A list of MIME types the operation can produce. For example:
"produces" : [ "application/json", "application/bjson",
"application/xml" ]
consumes A list of MIME types the operation can consume. For example:
"consumes" : [ "application/json", "application/bjson",
"application/xml" ]
parameters A list of parameters that are applicable for the operation. For example:
"parameters":[  
					{  
						"in":"body",
						"name":"planItemExecuteRequest",
						"description":"planItemExecuteRequest",
						"required":true,
						"schema":{  
							"$ref":"#/definitions/PlanItemExecuteRequest"
						}
					}
responses A list of possible responses returned by executing the operation. For example, a successful response is:
"responses":{  
					"200":{  
						"description":"OK"
					},
					"201":{  
						"description":"Created"
					},
					"202":{  
						"description":"Accepted"
					}
$ref

Refer to other components in the specification, internally and externally.

For example:
"$ref":"#/definitions/OMHTTPExceptionHandler"