Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "swagger": "2.0",
- "x-api-id": "test-api",
- "info": {
- "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.",
- "version": "1.0.0",
- "title": "Test API",
- "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"
- }
- },
- "host": "example.com",
- "basePath": "/",
- "schemes": [
- "http"
- ],
- "paths": {
- "/hello": {
- "get": {
- "tags": [
- "hello"
- ],
- "summary": "Says hello",
- "description": "",
- "operationId": "hello",
- "consumes": [
- "application/json"
- ],
- "produces": [
- "application/json"
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "$ref": "#/definitions/Greeting"
- }
- }
- }
- }
- },
- "/hello/{name}": {
- "get": {
- "tags": [
- "hello"
- ],
- "summary": "Says hello to someone",
- "description": "",
- "operationId": "helloName",
- "produces": [
- "application/json"
- ],
- "parameters": [
- {
- "name": "name",
- "in": "path",
- "description": "Name to say hello to",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "schema": {
- "$ref": "#/definitions/Greeting"
- }
- },
- "400": {
- "description": "Invalid Name supplied"
- }
- }
- }
- }
- },
- "definitions": {
- "Greeting": {
- "type": "object",
- "properties": {
- "greeting": {
- "type": "string"
- }
- }
- }
- },
- "externalDocs": {
- "description": "Find out more about Swagger",
- "url": "http://swagger.io"
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement