-
Notifications
You must be signed in to change notification settings - Fork 527
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1301 from r-sreesaran/issue-1236
Fix for issue 1236
- Loading branch information
Showing
3 changed files
with
145 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
131 changes: 131 additions & 0 deletions
131
modules/swagger-parser-v3/src/test/resources/issue-1236/petstore.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
{ | ||
"openapi": "3.0.2", | ||
"info": { | ||
"title": "Swagger Petstore - OpenAPI 3.0", | ||
"description": "This is a sample Pet Store Server based on the OpenAPI 3.0 specification. You can find out more about\nSwagger at [http://swagger.io](http://swagger.io). In the third iteration of the pet store, we've switched to the design first approach!\nYou can now help us improve the API whether it's by making changes to the definition itself or to the code.\nThat way, with time, we can improve the API in general, and expose some of the new features in OAS3.\n\nSome useful links:\n- [The Pet Store repository](https://github.com/swagger-api/swagger-petstore)\n- [The source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml)", | ||
"termsOfService": "http://swagger.io/terms/", | ||
"contact": { | ||
"email": "apiteam@swagger.io" | ||
}, | ||
"license": { | ||
"name": "Apache 2.0", | ||
"url": "http://www.apache.org/licenses/LICENSE-2.0.html" | ||
}, | ||
"version": "1.0.4" | ||
}, | ||
"externalDocs": { | ||
"description": "Find out more about Swagger", | ||
"url": "http://swagger.io" | ||
}, | ||
"servers": [ | ||
{ | ||
"url": "/te st/sample.yaml" | ||
} | ||
], | ||
"tags": [ | ||
{ | ||
"name": "pet", | ||
"description": "Everything about your Pets", | ||
"externalDocs": { | ||
"description": "Find out more", | ||
"url": "http://swagger.io" | ||
} | ||
}, | ||
{ | ||
"name": "store", | ||
"description": "Operations about user" | ||
}, | ||
{ | ||
"name": "user", | ||
"description": "Access to Petstore orders", | ||
"externalDocs": { | ||
"description": "Find out more about our store", | ||
"url": "http://swagger.io" | ||
} | ||
} | ||
], | ||
"paths": { | ||
"/user/login": { | ||
"get": { | ||
"tags": [ | ||
"user" | ||
], | ||
"summary": "Logs user into the system", | ||
"description": "", | ||
"operationId": "loginUser", | ||
"parameters": [ | ||
{ | ||
"name": "username", | ||
"in": "query", | ||
"description": "The user name for login", | ||
"required": false, | ||
"schema": { | ||
"type": "string" | ||
} | ||
}, | ||
{ | ||
"name": "password", | ||
"in": "query", | ||
"description": "The password for login in clear text", | ||
"required": false, | ||
"schema": { | ||
"type": "string" | ||
} | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "successful operation", | ||
"headers": { | ||
"X-Rate-Limit": { | ||
"description": "calls per hour allowed by the user", | ||
"schema": { | ||
"type": "integer", | ||
"format": "int32" | ||
} | ||
}, | ||
"X-Expires-After": { | ||
"description": "date in UTC when toekn expires", | ||
"schema": { | ||
"type": "string", | ||
"format": "date-time" | ||
} | ||
} | ||
}, | ||
"content": { | ||
"application/xml": { | ||
"schema": { | ||
"type": "string" | ||
} | ||
}, | ||
"application/json": { | ||
"schema": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
}, | ||
"400": { | ||
"description": "Invalid username/password supplied" | ||
} | ||
} | ||
} | ||
}, | ||
"/user/logout": { | ||
"get": { | ||
"tags": [ | ||
"user" | ||
], | ||
"summary": "Logs out current logged in user session", | ||
"description": "", | ||
"operationId": "logoutUser", | ||
"parameters": [], | ||
"responses": { | ||
"default": { | ||
"description": "successful operation" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |