Advertisement
Guest User

Untitled

a guest
Dec 15th, 2017
321
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.32 KB | None | 0 0
  1. {
  2. "swagger": "2.0",
  3. "x-api-id": "test-api",
  4. "info": {
  5. "description": "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.",
  6. "version": "1.0.0",
  7. "title": "Test API",
  8. "termsOfService": "http://swagger.io/terms/",
  9. "contact": {
  10. "email": "apiteam@swagger.io"
  11. },
  12. "license": {
  13. "name": "Apache 2.0",
  14. "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
  15. }
  16. },
  17. "host": "example.com",
  18. "basePath": "/",
  19. "schemes": [
  20. "http"
  21. ],
  22. "paths": {
  23. "/hello": {
  24. "get": {
  25. "tags": [
  26. "hello"
  27. ],
  28. "summary": "Says hello",
  29. "description": "",
  30. "operationId": "hello",
  31. "consumes": [
  32. "application/json"
  33. ],
  34. "produces": [
  35. "application/json"
  36. ],
  37. "responses": {
  38. "200": {
  39. "description": "successful operation",
  40. "schema": {
  41. "$ref": "#/definitions/Greeting"
  42. }
  43. }
  44. }
  45. }
  46. },
  47. "/hello/{name}": {
  48. "get": {
  49. "tags": [
  50. "hello"
  51. ],
  52. "summary": "Says hello to someone",
  53. "description": "",
  54. "operationId": "helloName",
  55. "produces": [
  56. "application/json"
  57. ],
  58. "parameters": [
  59. {
  60. "name": "name",
  61. "in": "path",
  62. "description": "Name to say hello to",
  63. "required": true,
  64. "type": "string"
  65. }
  66. ],
  67. "responses": {
  68. "200": {
  69. "description": "successful operation",
  70. "schema": {
  71. "$ref": "#/definitions/Greeting"
  72. }
  73. },
  74. "400": {
  75. "description": "Invalid Name supplied"
  76. }
  77. }
  78. }
  79. }
  80. },
  81. "definitions": {
  82. "Greeting": {
  83. "type": "object",
  84. "properties": {
  85. "greeting": {
  86. "type": "string"
  87. }
  88. }
  89. }
  90. },
  91. "externalDocs": {
  92. "description": "Find out more about Swagger",
  93. "url": "http://swagger.io"
  94. }
  95. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement