Skip to content

Instantly share code, notes, and snippets.

@mohsen1
Last active August 29, 2015 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mohsen1/3498d865c1d5ebb9f50f to your computer and use it in GitHub Desktop.
Save mohsen1/3498d865c1d5ebb9f50f to your computer and use it in GitHub Desktop.
{
"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
}
]
}
]
}
]
}
{
"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