Last active
August 29, 2015 14:16
-
-
Save mohsen1/3498d865c1d5ebb9f50f to your computer and use it in GitHub Desktop.
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
{ | |
"apiVersion": "1.0.0", | |
"swaggerVersion": "1.2", | |
"basePath": "http://swagger.io", | |
"resourcePath": "/people/@me", | |
"produces": [ | |
"application/xml", | |
"application/json" | |
], | |
"consumes": [ | |
"application/xml", | |
"application/json" | |
], | |
"apis": [ | |
{ | |
"path": "/people/@me/profile", | |
"operations": [ | |
{ | |
"method": "GET", | |
"summary": "Get profile for a person.", | |
"type": "void", | |
"nickname": "getSlimProfile", | |
"produces": [ | |
"application/xml", | |
"application/json" | |
], | |
"parameters": [ | |
{ | |
"name": "X-Person-ID", | |
"required": false, | |
"type": "integer", | |
"format": "int64", | |
"paramType": "header", | |
"allowMultiple": false | |
} | |
] | |
} | |
] | |
} | |
] | |
} |
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
{ | |
"swagger": "2.0", | |
"info": { | |
"version": "1.0.0", | |
"title": "Basic Auth Example", | |
"description": "**User Name and Password**\n* User Name: `user`\n* Password: `pass`\n" | |
}, | |
"host": "basic-auth-server.herokuapp.com", | |
"schemes": [ | |
"http", | |
"https" | |
], | |
"securityDefinitions": { | |
"basicAuth": { | |
"type": "basic", | |
"description": "HTTP Basic Authentication. Works over `HTTP` and `HTTPS`" | |
} | |
}, | |
"paths": { | |
"/": { | |
"get": { | |
"security": [ | |
{ | |
"basicAuth": [] | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Will send `Authenticated` if authentication is succesful, otherwise it will send `Unauthorized`" | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment