Skip to content

Commit

Permalink
OpenAPIv3 support documented (Azure#5000)
Browse files Browse the repository at this point in the history
* OpenAPIv3 support documented

* Enum name fixed. Example added
  • Loading branch information
VitaliyKurokhtin authored and AnuTalluri committed Feb 6, 2019
1 parent 7682c1e commit bf9fd22
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,9 @@
"application/json",
"application/vnd.sun.wadl+xml",
"application/vnd.swagger.doc+json",
"application/wsdl+xml"
"application/wsdl+xml",
"application/vnd.oai.openapi",
"application/vnd.oai.openapi+json"
],
"parameters": [
{
Expand Down Expand Up @@ -216,6 +218,9 @@
"operationId": "Api_CreateOrUpdate",
"description": "Creates new or updates existing specified API of the API Management service instance.",
"x-ms-examples": {
"ApiManagementCreateApiUsingOai3Import": {
"$ref": "./examples/ApiManagementCreateApiUsingOai3Import.json"
},
"ApiManagementCreateApiUsingSwaggerImport": {
"$ref": "./examples/ApiManagementCreateApiUsingSwaggerImport.json"
},
Expand All @@ -242,7 +247,9 @@
"application/json",
"application/vnd.sun.wadl+xml",
"application/vnd.swagger.doc+json",
"application/wsdl+xml"
"application/wsdl+xml",
"application/vnd.oai.openapi",
"application/vnd.oai.openapi+json"
],
"parameters": [
{
Expand Down Expand Up @@ -3395,7 +3402,8 @@
"enum": [
"swagger-link",
"wadl-link",
"wsdl-link"
"wsdl-link",
"openapi-link"
],
"x-ms-enum": {
"name": "ExportFormat",
Expand All @@ -3415,6 +3423,11 @@
"value": "wadl-link",
"description": "Export the Api Definition in WADL Schema to Storage Blob.",
"name": "Wadl"
},
{
"value": "openapi-link",
"description": "Export the Api Definition in OpenApi Specification 3.0 to Storage Blob.",
"name": "OpenApi3"
}
]
},
Expand Down Expand Up @@ -3526,7 +3539,10 @@
"swagger-json",
"swagger-link-json",
"wsdl",
"wsdl-link"
"wsdl-link",
"openapi",
"openapi+json",
"openapi-link"
],
"x-ms-enum": {
"name": "ContentFormat",
Expand Down Expand Up @@ -3555,6 +3571,18 @@
{
"value": "wsdl-link",
"description": "The WSDL document is hosted on a publicly accessible internet address."
},
{
"value": "openapi",
"description": "The contents are inline and Content Type is a OpenApi 3.0 Document in YAML format."
},
{
"value": "openapi+json",
"description": "The contents are inline and Content Type is a OpenApi 3.0 Document in JSON format."
},
{
"value": "openapi-link",
"description": "The Open Api 3.0 document is hosted on a publicly accessible internet address."
}
]
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"parameters": {
"serviceName": "apimService1",
"resourceGroupName": "rg1",
"api-version": "2018-06-01-preview",
"subscriptionId": "subid",
"apiId": "petstore",
"parameters": {
"properties": {
"contentFormat": "openapi-link",
"contentValue": "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml",
"path": "petstore"
}
}
},
"responses": {
"201": {
"body": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/petstoreapi",
"type": "Microsoft.ApiManagement/service/apis",
"name": "petstoreapi",
"properties": {
"displayName": "Swagger Petstore",
"apiRevision": "1",
"serviceUrl": "http://petstore.swagger.io/v1",
"path": "petstore",
"protocols": [
"https"
],
"subscriptionKeyParameterNames": {
"header": "Ocp-Apim-Subscription-Key",
"query": "subscription-key"
},
"isCurrent": true
}
}
},
"200": {
"body": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/petstoreapi",
"type": "Microsoft.ApiManagement/service/apis",
"name": "petstoreapi",
"properties": {
"displayName": "Swagger Petstore",
"apiRevision": "1",
"serviceUrl": "http://petstore.swagger.io/v1",
"path": "petstore",
"protocols": [
"https"
],
"subscriptionKeyParameterNames": {
"header": "Ocp-Apim-Subscription-Key",
"query": "subscription-key"
},
"isCurrent": true
}
}
}
}
}

0 comments on commit bf9fd22

Please sign in to comment.