Add generated file

This PR adds generated files under pkg/client and vendor folder.
This commit is contained in:
xing-yang
2018-07-12 10:55:15 -07:00
parent 36b1de0341
commit e213d1890d
17729 changed files with 5090889 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
farFarAway:
type: object
properties:
farFarAwayProp:
type: integer

View File

@@ -0,0 +1,11 @@
aRemotePlace:
type: object
properties:
remoteProp:
type: integer
fartherProp:
$ref: './farther/farther.yaml#/farFarAway'
moreRemoteThanYouCanThink:
#$ref: './remote/remote.yaml#/farFarAway'
type: integer

View File

@@ -0,0 +1,5 @@
farFarAway:
type: object
properties:
farFarAwayProp:
type: integer

View File

@@ -0,0 +1,104 @@
swagger: '2.0'
info:
title: Responses
version: 0.1.0
definitions:
Error:
type: object
description: |
Contains all the properties any error response from the API will contain.
Some properties are optional so might be empty most of the time
required:
- code
- message
properties:
code:
description: the error code, this is not necessarily the http status code
type: integer
format: int32
message:
description: a human readable version of the error
type: string
helpUrl:
description: an optional url for getting more help about this error
type: string
format: uri
myArray:
type: array
items:
$ref: '#/definitions/myItems'
myItems:
type: object
properties:
propItems1:
type: integer
propItems2:
$ref: 'remote/remote.yaml#/aRemotePlace'
otherPlace:
Error:
type: object
properties:
message:
type: string
parameters:
BadRequest:
name: badRequest
in: body
schema:
$ref: '#/definitions/Error'
GoodRequest:
name: goodRequest
in: body
schema:
$ref: '#/otherPlace/Error'
PlainRequest:
name: plainRequest
in: body
schema:
type: integer
StrangeRequest:
name: stangeRequest
in: body
schema:
$ref: 'responses.yaml#/otherPlace/Error'
RemoteRequest:
name: remoteRequest
in: body
schema:
$ref: './remote/remote.yaml#/moreRemoteThanYouCanThink'
responses:
BadRequest:
description: Bad request
schema:
$ref: '#/definitions/Error'
GoodRequest:
description: good request
schema:
$ref: '#/otherPlace/Error'
PlainRequest:
description: plain request
schema:
type: integer
StrangeRequest:
description: strange request
schema:
$ref: 'responses.yaml#/otherPlace/Error'
RemoteRequest:
description: remote request
schema:
$ref: './remote/remote.yaml#/moreRemoteThanYouCanThink'
paths:
/:
get:
summary: GET
operationId: getAll
responses:
200:
description: Ok

View File

@@ -0,0 +1,39 @@
swagger: '2.0'
info:
title: Object
version: 0.1.0
paths:
/:
get:
summary: GET
operationId: getAll
parameters:
- $ref: 'responses.yaml#/parameters/BadRequest'
- $ref: 'responses.yaml#/parameters/GoodRequest'
- $ref: 'responses.yaml#/parameters/PlainRequest'
- $ref: 'responses.yaml#/parameters/StrangeRequest'
- $ref: 'responses.yaml#/parameters/RemoteRequest'
- name: nestedBody
in: body
schema:
$ref: '#/definitions/nestedRefDefinition'
responses:
200:
description: Ok
400:
$ref: 'responses.yaml#/responses/BadRequest'
403:
$ref: 'responses.yaml#/responses/GoodRequest'
404:
$ref: 'responses.yaml#/responses/PlainRequest'
304:
$ref: 'responses.yaml#/responses/StrangeRequest'
204:
$ref: 'responses.yaml#/responses/RemoteRequest'
definitions:
badDefinition:
$ref: 'responses.yaml#/definitions/Error'
nestedRefDefinition:
$ref: 'responses.yaml#/definitions/myArray'

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,254 @@
{
"swagger": "2.0",
"info": {
"version": "1.0.0",
"title": "Swagger Petstore",
"description": "A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification",
"termsOfService": "http://helloreverb.com/terms/",
"contact": {
"name": "Wordnik API Team"
},
"license": {
"name": "MIT"
}
},
"host": "petstore.swagger.wordnik.com",
"basePath": "/api",
"schemes": [
"http"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": {
"idParam": {
"name": "id",
"in": "path",
"description": "ID of pet to fetch",
"required": true,
"type": "integer",
"format": "int64"
},
"tag": {
"type": "string",
"in": "query",
"required": false
},
"query": {
"$ref": "#/parameters/tag"
}
},
"responses": {
"petResponse": {
"description": "pet response",
"schema": {
"$ref": "#/definitions/pet"
}
},
"stringResponse": {
"descripion": "string response",
"schema": {
"type": "string"
}
},
"anotherPet": {
"$ref": "#/responses/petResponse"
}
},
"paths": {
"/": {
"get": {
"operationId": "indexStuff",
"responses": {
"default": {
"$ref": "#/responses/stringResponse"
},
"200": {
"$ref": "#/responses/anotherPet"
}
}
}
},
"/pets": {
"get": {
"description": "Returns all pets from the system that the user has access to",
"operationId": "findPets",
"produces": [
"application/json",
"application/xml",
"text/xml",
"text/html"
],
"parameters": [
{
"name": "tags",
"in": "query",
"description": "tags to filter by",
"required": false,
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "csv"
},
{
"name": "limit",
"in": "query",
"description": "maximum number of results to return",
"required": false,
"type": "integer",
"format": "int32"
}
],
"responses": {
"200": {
"description": "pet response",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/pet"
}
}
},
"default": {
"description": "unexpected error",
"schema": {
"$ref": "#/definitions/errorModel"
}
}
}
},
"post": {
"description": "Creates a new pet in the store. Duplicates are allowed",
"operationId": "addPet",
"produces": [
"application/json"
],
"parameters": [
{
"name": "pet",
"in": "body",
"description": "Pet to add to the store",
"required": true,
"schema": {
"$ref": "#/definitions/petInput"
}
}
],
"responses": {
"200": { "$ref": "#/responses/petResponse" },
"default": {
"description": "unexpected error",
"schema": {
"$ref": "#/definitions/errorModel"
}
}
}
}
},
"/pets/{id}": {
"get": {
"description": "Returns a user based on a single ID, if the user does not have access to the pet",
"operationId": "findPetById",
"produces": [
"application/json",
"application/xml",
"text/xml",
"text/html"
],
"parameters": [
{
"$ref": "#/parameters/idParam"
}
],
"responses": {
"200": {
"$ref": "#/responses/petResponse"
},
"default": {
"description": "unexpected error",
"schema": {
"$ref": "#/definitions/errorModel"
}
}
}
},
"delete": {
"description": "deletes a single pet based on the ID supplied",
"operationId": "deletePet",
"parameters": [
{
"$ref": "#/parameters/idParam"
}
],
"responses": {
"204": {
"description": "pet deleted"
},
"default": {
"description": "unexpected error",
"schema": {
"$ref": "#/definitions/errorModel"
}
}
}
}
}
},
"definitions": {
"pet": {
"required": [
"id",
"name"
],
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"name": {
"type": "string"
},
"tag": {
"type": "string"
}
}
},
"petInput": {
"allOf": [
{
"$ref": "#/definitions/pet"
},
{
"required": [
"name"
],
"properties": {
"id": {
"type": "integer",
"format": "int64"
}
}
}
]
},
"errorModel": {
"required": [
"code",
"message"
],
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
}
}
}
}
}

View File

@@ -0,0 +1,58 @@
{
"swagger": "2.0",
"info": {
"version": "0.0.1"
},
"basePath": "/",
"paths": {
"/cycles": {
"get": {
"responses": {
"200": {
"description": "ok",
"schema": {
"$ref": "#/definitions/node0"
}
}
}
}
}
},
"definitions": {
"node0": {
"type": "object",
"properties": {
"p00": {
"$ref": "#/definitions/node1"
},
"p01": {
"$ref": "#/definitions/node3"
}
}
},
"node1": {
"type": "object",
"properties": {
"p1": {
"$ref": "#/definitions/node2"
}
}
},
"node2": {
"type": "object",
"properties": {
"p2": {
"$ref": "#/definitions/node0"
}
}
},
"node3": {
"type": "object",
"properties": {
"p3": {
"$ref": "#/definitions/node1"
}
}
}
}
}

View File

@@ -0,0 +1,54 @@
{
"definitions": {
"brand": {
"type": "object",
"properties": {
"name": {
"type": "string"
}
}
},
"category": {
"type": "object",
"properties": {
"children": {
"type": "array",
"items": {
"$ref": "#/definitions/category"
}
}
}
},
"car": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"make": {
"type": "string"
},
"similar": {
"items": {
"$ref": "#/definitions/car"
}
},
"notSimilar": {
"additionalProperties": {
"$ref": "#/definitions/car"
}
},
"oneCar": {
"$ref": "#/definitions/car"
},
"category": {
"$ref": "#/definitions/category"
},
"brand": {
"$ref": "#/definitions/brand"
}
}
}
}
}

View File

@@ -0,0 +1 @@
{"swagger":"2.0","info":{"title":"Swagger Sample","description":"Sample API Playground.","version":"1.0.0"},"basePath":"/v1","schemes":["http"],"consumes":["application/vdn.sample.v1+json"],"produces":["application/vdn.sample.v1+json"],"paths":{"/books":{"get":{"summary":"List all books","operationId":"listBooks","tags":["books"],"responses":{"200":{"headers":{"Link":{"type":"string"}},"description":"An array of books","schema":{"type":"array","items":{"$ref":"#/definitions/Book"}}},"default":{"description":"generic error response","schema":{"$ref":"#/definitions/Error"}}}}}},"definitions":{"Book":{"type":"object","required":["title","summary"],"properties":{"title":{"type":"string","example":"Winnie the Pooh"},"summary":{"type":"string","example":"Famous children's book"},"related_books":{"type":"array","items":{"$ref":"#/definitions/Book"}}}},"Error":{"type":"object","readOnly":true,"properties":{"code":{"type":"integer","format":"int64","example":400},"message":{"type":"string","example":"Unexpected error"}},"required":["message"]}}}

View File

@@ -0,0 +1,67 @@
---
swagger: "2.0"
info:
title: Swagger Sample
description: Sample API Playground.
version: 1.0.0
basePath: /v1
schemes:
- http
consumes:
- application/vdn.sample.v1+json
produces:
- application/vdn.sample.v1+json
paths:
/books:
get:
summary: List all books
operationId: listBooks
tags:
- books
responses:
200:
headers:
Link:
type: string
description: An array of books
schema:
type: array
items:
$ref: "#/definitions/Book"
default:
description: generic error response
schema:
$ref: "#/definitions/Error"
definitions:
Book:
type: object
required:
- title
- summary
properties:
title:
type: string
example: Winnie the Pooh
summary:
type: string
example: Famous children's book
related_books:
type: array
items:
$ref: "#/definitions/Book"
Error:
type: object
readOnly: true
properties:
code:
type: integer
format: int64
example: 400
message:
type: string
example: Unexpected error
required:
- message

View File

@@ -0,0 +1,330 @@
{
"swagger": "2.0",
"info": {
"title": "swagger.yaml for investigating an issue with spec.expandSchema",
"version": "0.0.1",
"description": "expander.go test for issue analysis, the spec derived from ODataWebV3.Northwind.Model and simplified for the analysis"
},
"schemes": [
"http"
],
"host": "localhost",
"basePath": "/modified_from_Northwind.svc",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/Employees": {
"get": {
"summary": "Get entities from Employees",
"responses": {
"200": {
"description": "Retrieved entities",
"schema": {
"title": "Collection of Employee",
"type": "object",
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/Employee"
}
}
}
}
},
"default": {
"$ref": "#/responses/error"
}
}
}
}
},
"definitions": {
"Category": {
"type": "object",
"properties": {
"CategoryID": {
"type": "integer",
"format": "int32"
},
"CategoryName": {
"type": "string",
"maxLength": 15
},
"Products": {
"type": "array",
"items": {
"$ref": "#/definitions/Product"
}
}
},
"title": "Category"
},
"CustomerDemographic": {
"type": "object",
"properties": {
"CustomerTypeID": {
"type": "string",
"maxLength": 10
},
"CustomerDesc": {
"type": "string",
"example": "string"
},
"Customers": {
"type": "array",
"items": {
"$ref": "#/definitions/Customer"
}
}
},
"title": "CustomerDemographic"
},
"Customer": {
"type": "object",
"properties": {
"CustomerID": {
"type": "string",
"maxLength": 5
},
"CompanyName": {
"type": "string",
"maxLength": 40
},
"Orders": {
"type": "array",
"items": {
"$ref": "#/definitions/Order"
}
},
"CustomerDemographics": {
"type": "array",
"items": {
"$ref": "#/definitions/CustomerDemographic"
}
}
},
"title": "Customer"
},
"Employee": {
"type": "object",
"properties": {
"EmployeeID": {
"type": "integer",
"format": "int32"
},
"LastName": {
"type": "string",
"maxLength": 20
},
"FirstName": {
"type": "string",
"maxLength": 10
},
"Employees1": {
"type": "array",
"items": {
"$ref": "#/definitions/Employee"
}
},
"Employee1": {
"$ref": "#/definitions/Employee"
},
"Orders": {
"type": "array",
"items": {
"$ref": "#/definitions/Order"
}
},
"Territories": {
"type": "array",
"items": {
"$ref": "#/definitions/Territory"
}
}
},
"title": "Employee"
},
"Order_Detail": {
"type": "object",
"properties": {
"OrderID": {
"type": "integer",
"format": "int32"
},
"ProductID": {
"type": "integer",
"format": "int32"
},
"UnitPrice": {
"type": "number",
"format": "decimal",
"multipleOf": 0.0001
},
"Quantity": {
"type": "integer",
"format": "int16"
},
"Order": {
"$ref": "#/definitions/Order"
},
"Product": {
"$ref": "#/definitions/Product"
}
},
"title": "Order_Detail"
},
"Order": {
"type": "object",
"properties": {
"OrderID": {
"type": "integer",
"format": "int32"
},
"CustomerID": {
"type": "string",
"maxLength": 5,
"example": "string"
},
"Customer": {
"$ref": "#/definitions/Customer"
},
"Employee": {
"$ref": "#/definitions/Employee"
},
"Order_Details": {
"type": "array",
"items": {
"$ref": "#/definitions/Order_Detail"
}
},
"Shipper": {
"$ref": "#/definitions/Shipper"
}
},
"title": "Order"
},
"Product": {
"type": "object",
"properties": {
"ProductID": {
"type": "integer",
"format": "int32"
},
"ProductName": {
"type": "string",
"maxLength": 40
},
"Category": {
"$ref": "#/definitions/Category"
},
"Order_Details": {
"type": "array",
"items": {
"$ref": "#/definitions/Order_Detail"
}
},
"Supplier": {
"$ref": "#/definitions/Supplier"
}
},
"title": "Product"
},
"Region": {
"type": "object",
"properties": {
"RegionID": {
"type": "integer",
"format": "int32"
},
"RegionDescription": {
"type": "string",
"maxLength": 50
},
"Territories": {
"type": "array",
"items": {
"$ref": "#/definitions/Territory"
}
}
},
"title": "Region"
},
"Shipper": {
"type": "object",
"properties": {
"ShipperID": {
"type": "integer",
"format": "int32"
},
"CompanyName": {
"type": "string",
"maxLength": 40
},
"Orders": {
"type": "array",
"items": {
"$ref": "#/definitions/Order"
}
}
},
"title": "Shipper"
},
"Supplier": {
"type": "object",
"properties": {
"SupplierID": {
"type": "integer",
"format": "int32"
},
"CompanyName": {
"type": "string",
"maxLength": 40
},
"Products": {
"type": "array",
"items": {
"$ref": "#/definitions/Product"
}
}
},
"title": "Supplier"
},
"Territory": {
"type": "object",
"properties": {
"TerritoryID": {
"type": "string",
"maxLength": 20
},
"TerritoryDescription": {
"type": "string",
"maxLength": 50
},
"RegionID": {
"type": "integer",
"format": "int32"
},
"Region": {
"$ref": "#/definitions/Region"
},
"Employees": {
"type": "array",
"items": {
"$ref": "#/definitions/Employee"
}
}
},
"title": "Territory"
}
},
"responses": {
"error": {
"description": "Error"
}
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,85 @@
{
"swagger": "2.0",
"info": {
"version": "1.0.0",
"title": "Swagger Petstore",
"contact": {
"name": "wordnik api team",
"url": "http://developer.wordnik.com"
},
"license": {
"name": "Creative Commons 4.0 International",
"url": "http://creativecommons.org/licenses/by/4.0/"
}
},
"host": "petstore.swagger.wordnik.com",
"basePath": "/api",
"schemes": [
"http"
],
"paths": {
"/pets": {
"get": {
"tags": [ "Pet Operations" ],
"summary": "finds pets in the system",
"responses": {
"200": {
"description": "pet response",
"schema": {
"type": "array",
"items": {
"$ref": "NotCorrectRef"
}
},
"headers": {
"x-expires": {
"type": "string"
}
}
},
"default": {
"description": "unexpected error",
"schema": {
"$ref": "NotCorrectRef"
}
}
}
}
}
},
"definitions": {
"Pet": {
"required": [
"id",
"name"
],
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"name": {
"type": "string"
},
"tag": {
"type": "string"
}
}
},
"Error": {
"required": [
"code",
"message"
],
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
}
}
}
}
}

View File

@@ -0,0 +1,31 @@
{
"swagger": "2.0",
"info": {
"version": "2.1.0",
"title": "Missing Item API"
},
"host": "item.com",
"basePath": "/missing/ref",
"schemes": [
"http"
],
"paths": {
"/employees": {
"get": {
"operationId": "LIST-Employees",
"summary": "List Employee Types",
"responses": {
"200": {
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/employees-output"
}
}
}
}
}
}
}
}

View File

@@ -0,0 +1,165 @@
{
"input": {
"swagger": "2.0",
"info": {
"version": "1.0",
"title": "Continue On Error"
},
"paths": {
"/todos": {
"get": {
"responses": {
"200": {
"description": "List Todos",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/todo-full"
}
}
},
"404": {
"$ref": "#/responses/404"
}
}
}
}
},
"definitions": {
"todo-partial": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"completed": {
"type": "boolean"
}
}
},
"todo-full": {
"allOf": [
{
"$ref": "#/definitions/todo-partial"
},
{
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"completed_at": {
"type": "string"
},
"created_at": {
"type": "string"
},
"updated_at": {
"type": "string"
}
}
}
]
}
}
},
"expected": {
"swagger": "2.0",
"info": {
"title": "Continue On Error",
"version": "1.0"
},
"paths": {
"/todos": {
"get": {
"responses": {
"200": {
"description": "List Todos",
"schema": {
"type": "array",
"items": {
"allOf": [
{
"type": "object",
"properties": {
"completed": {
"type": "boolean"
},
"name": {
"type": "string"
}
}
},
{
"type": "object",
"properties": {
"completed_at": {
"type": "string"
},
"created_at": {
"type": "string"
},
"id": {
"type": "integer"
},
"updated_at": {
"type": "string"
}
}
}
]
}
}
},
"404": {}
}
}
}
},
"definitions": {
"todo-full": {
"allOf": [
{
"type": "object",
"properties": {
"completed": {
"type": "boolean"
},
"name": {
"type": "string"
}
}
},
{
"type": "object",
"properties": {
"completed_at": {
"type": "string"
},
"created_at": {
"type": "string"
},
"id": {
"type": "integer"
},
"updated_at": {
"type": "string"
}
}
}
]
},
"todo-partial": {
"type": "object",
"properties": {
"completed": {
"type": "boolean"
},
"name": {
"type": "string"
}
}
}
}
}
}

View File

@@ -0,0 +1,124 @@
{
"swagger": "2.0",
"info": {
"title": "Swagger Sample",
"description": "Sample API Playground.",
"version": "1.0.0"
},
"basePath": "/v1",
"schemes": [
"http"
],
"consumes": [
"application/vdn.sample.v1+json"
],
"produces": [
"application/vdn.sample.v1+json"
],
"paths": {
"/books": {
"get": {
"summary": "List all books",
"operationId": "listBooks",
"tags": [
"books"
],
"responses": {
"200": {
"headers": {
"Link": {
"type": "string"
}
},
"description": "An array of books",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Book"
}
}
},
"default": {
"description": "generic error response",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
}
},
"definitions": {
"Store": {
"type": "object",
"properties": {
"title": {
"type": "string",
"example": "Book Shop"
},
"categories": {
"type": "array",
"items": {
"$ref": "#/definitions/Category"
}
}
}
},
"Category": {
"type": "object",
"properties": {
"title": {
"type": "string",
"example": "Drama"
},
"books": {
"type": "array",
"items": {
"$ref": "#/definitions/Book"
}
}
}
},
"Book": {
"type": "object",
"required": [
"title",
"summary"
],
"properties": {
"title": {
"type": "string",
"example": "Winnie the Pooh"
},
"summary": {
"type": "string",
"example": "Famous children's book"
},
"related_books": {
"type": "array",
"items": {
"$ref": "#/definitions/Book"
}
}
}
},
"Error": {
"type": "object",
"readOnly": true,
"properties": {
"code": {
"type": "integer",
"format": "int64",
"example": 400
},
"message": {
"type": "string",
"example": "Unexpected error"
}
},
"required": [
"message"
]
}
}
}

View File

@@ -0,0 +1,25 @@
{
"parameters": {
"id": {
"type": "integer",
"format": "int64",
"in": "path",
"required": true
},
"tag": {
"type": "string",
"in": "query",
"required": false
},
"query": {
"$ref": "#/parameters/tag"
}
},
"paths": {
"/cars/{id}": {
"parameters": [
{ "$ref": "#/parameters/id"}
]
}
}
}

View File

@@ -0,0 +1,127 @@
{
"definitions": {
"car": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"make": {
"type": "string"
},
"brand": {
"$ref": "#/definitions/brand"
}
}
},
"tag": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"value": {
"type": "string"
}
}
},
"brand": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"name": {
"type": "string"
}
}
},
"truck": {
"$ref": "#/definitions/car"
},
"batch": {
"items": {
"$ref": "#/definitions/brand"
}
},
"batch2": {
"items": [
{
"$ref": "#/definitions/brand"
},
{
"$ref": "#/definitions/tag"
}
]
},
"allofBoth": {
"allOf": [
{
"$ref": "#/definitions/brand"
},
{
"$ref": "#/definitions/tag"
}
]
},
"anyofBoth": {
"anyOf": [
{
"$ref": "#/definitions/brand"
},
{
"$ref": "#/definitions/tag"
}
]
},
"oneofBoth": {
"oneOf": [
{
"$ref": "#/definitions/brand"
},
{
"$ref": "#/definitions/tag"
}
]
},
"notSomething": {
"not": {
"$ref": "#/definitions/tag"
}
},
"withAdditional": {
"additionalProperties": {
"$ref": "#/definitions/tag"
}
},
"withPattern": {
"patternProperties": {
"^x-ab": {
"$ref": "#/definitions/tag"
}
}
},
"withAdditionalItems": {
"additionalItems": {
"$ref": "#/definitions/tag"
}
},
"deps": {
"dependencies": {
"something": {
"$ref": "#/definitions/tag"
}
}
},
"defined": {
"definitions": {
"something": {
"$ref": "#/definitions/tag"
}
}
}
}
}

View File

@@ -0,0 +1,161 @@
{
"definitions": {
"car": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"make": {
"type": "string"
},
"brand": {
"items": {
"$ref": "#/definitions/brand"
}
}
}
},
"tag": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"value": {
"type": "string"
}
}
},
"brand": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"name": {
"type": "string"
}
}
},
"truck": {
"items": {
"$ref": "#/definitions/car"
}
},
"batch": {
"items": {
"items": {
"$ref": "#/definitions/brand"
}
}
},
"batch2": {
"items": [
{
"items": {
"$ref": "#/definitions/brand"
}
},
{
"items": {
"$ref": "#/definitions/tag"
}
}
]
},
"allofBoth": {
"allOf": [
{
"items": {
"$ref": "#/definitions/brand"
}
},
{
"items": {
"$ref": "#/definitions/tag"
}
}
]
},
"anyofBoth": {
"anyOf": [
{
"items": {
"$ref": "#/definitions/brand"
}
},
{
"items": {
"$ref": "#/definitions/tag"
}
}
]
},
"oneofBoth": {
"oneOf": [
{
"items": {
"$ref": "#/definitions/brand"
}
},
{
"items": {
"$ref": "#/definitions/tag"
}
}
]
},
"notSomething": {
"not": {
"items": {
"$ref": "#/definitions/tag"
}
}
},
"withAdditional": {
"additionalProperties": {
"items": {
"$ref": "#/definitions/tag"
}
}
},
"withPattern": {
"patternProperties": {
"^x-ab": {
"items": {
"$ref": "#/definitions/tag"
}
}
}
},
"withAdditionalItems": {
"additionalItems": {
"items": {
"$ref": "#/definitions/tag"
}
}
},
"deps": {
"dependencies": {
"something": {
"items": {
"$ref": "#/definitions/tag"
}
}
}
},
"defined": {
"definitions": {
"something": {
"items": {
"$ref": "#/definitions/tag"
}
}
}
}
}
}

View File

@@ -0,0 +1,18 @@
{
"properties": {
"id": {
"format": "int64",
"readOnly": true,
"type": "integer"
},
"title": {
"maxLength": 80,
"minLength": 2,
"type": "string"
}
},
"required": [
"title"
],
"type": "object"
}

View File

@@ -0,0 +1,12 @@
type: object
required:
- title
properties:
id:
type: integer
format: uint64
readOnly: true
title:
type: string
minLength: 2
maxLength: 80

View File

@@ -0,0 +1,46 @@
{
"basePath": "/v1",
"consumes": [
"application/json"
],
"host": "item.api.local",
"info": {
"description": "Item API",
"title": "Item API",
"version": "1.0.0"
},
"paths": {
"/item": {
"get": {
"operationId": "GetItem",
"responses": {
"200": {
"description": "item detail response",
"schema": {
"$ref": "item.json"
}
}
}
}
}
},
"produces": [
"application/json"
],
"schemes": [
"http"
],
"security": [
{
"key": []
}
],
"securityDefinitions": {
"key": {
"in": "header",
"name": "x-item-token",
"type": "apiKey"
}
},
"swagger": "2.0"
}

View File

@@ -0,0 +1,30 @@
---
swagger: "2.0"
info:
title: Item API
description: Item API
version: "1.0.0"
host: item.api.local
basePath: /v1
securityDefinitions:
key:
type: apiKey
name: x-item-token
in: header
security:
- key: []
consumes:
- application/json
produces:
- application/json
schemes:
- http
paths:
/item:
get:
operationId: GetItem
responses:
200:
description: item detail response
schema:
"$ref": "item2.yaml"

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,23 @@
{
"item": {
"type": "object",
"required": [
"title"
],
"properties": {
"id": {
"type": "integer",
"format": "uint64",
"readOnly": true
},
"title": {
"type": "string",
"minLength": 2,
"maxLength": 80
},
"subitem": {
"$ref": "item.json#/item"
}
}
}
}

View File

@@ -0,0 +1,23 @@
{
"item": {
"type": "object",
"required": [
"title"
],
"properties": {
"id": {
"type": "integer",
"format": "uint64",
"readOnly": true
},
"title": {
"type": "string",
"minLength": 2,
"maxLength": 80
},
"subitem": {
"$ref": "#/item"
}
}
}
}

View File

@@ -0,0 +1,23 @@
{
"item": {
"type": "object",
"required": [
"title"
],
"properties": {
"id": {
"type": "integer",
"format": "uint64",
"readOnly": true
},
"title": {
"type": "string",
"minLength": 2,
"maxLength": 80
},
"subitem": {
"$ref": "item4.json#/item"
}
}
}
}

View File

@@ -0,0 +1,57 @@
{
"swagger": "2.0",
"info": {
"title": "Item API",
"description": "Item API",
"version": "1.0.0"
},
"host": "item.api.local",
"basePath": "/v1",
"securityDefinitions": {
"key": {
"type": "apiKey",
"name": "x-item-token",
"in": "header"
}
},
"security": [
{
"key": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"schemes": [
"http"
],
"responses": {
"itemResponse": {
"description": "Item",
"schema": {
"$ref": "item.json#/item"
}
}
},
"paths": {
"/item": {
"get": {
"operationId": "GetItem",
"responses": {
"200": {
"description": "item detail response",
"schema": {
"$ref": "item.json#/item"
}
},
"default": {
"$ref": "#/responses/itemResponse"
}
}
}
}
}
}

View File

@@ -0,0 +1,57 @@
{
"swagger": "2.0",
"info": {
"title": "Item API",
"description": "Item API",
"version": "1.0.0"
},
"host": "item.api.local",
"basePath": "/v1",
"securityDefinitions": {
"key": {
"type": "apiKey",
"name": "x-item-token",
"in": "header"
}
},
"security": [
{
"key": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"schemes": [
"http"
],
"responses": {
"itemResponse": {
"description": "Item",
"schema": {
"$ref": "item2.json#/item"
}
}
},
"paths": {
"/item": {
"get": {
"operationId": "GetItem",
"responses": {
"200": {
"description": "item detail response",
"schema": {
"$ref": "item2.json#/item"
}
},
"default": {
"$ref": "#/responses/itemResponse"
}
}
}
}
}
}

View File

@@ -0,0 +1,51 @@
{
"swagger": "2.0",
"info": {
"title": "Item API",
"description": "Item API",
"version": "1.0.0"
},
"host": "item.api.local",
"basePath": "/v1",
"securityDefinitions": {
"key": {
"type": "apiKey",
"name": "x-item-token",
"in": "header"
}
},
"security": [
{
"key": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"schemes": [
"http"
],
"paths": {
"/item": {
"get": {
"operationId": "GetItem",
"responses": {
"200": {
"description": "item detail response",
"schema": {
"$ref": "#/definitions/myItems"
}
}
}
}
}
},
"definitions": {
"myItems": {
"$ref": "item.json#/item"
}
}
}

View File

@@ -0,0 +1,59 @@
{
"swagger": "2.0",
"info": {
"title": "Item API",
"description": "Item API",
"version": "1.0.0"
},
"host": "item.api.local",
"basePath": "/v1",
"securityDefinitions": {
"key": {
"type": "apiKey",
"name": "x-item-token",
"in": "header"
}
},
"security": [
{
"key": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"schemes": [
"http"
],
"parameters": {
"itemParameter": {
"description": "Item",
"schema": {
"$ref": "item4.json#/item"
}
}
},
"paths": {
"/item": {
"get": {
"operationId": "GetItem",
"parameters": [
{
"$ref": "#/parameters/itemParameter"
}
],
"responses": {
"200": {
"description": "item detail response",
"schema": {
"$ref": "item4.json#/item"
}
}
}
}
}
}
}

View File

@@ -0,0 +1,245 @@
{
"swagger": "2.0",
"info": {
"version": "1.0.0",
"title": "Swagger Petstore",
"description":
"A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification",
"termsOfService": "http://helloreverb.com/terms/",
"contact": {
"name": "Wordnik API Team"
},
"license": {
"name": "MIT"
}
},
"host": "petstore.swagger.wordnik.com",
"basePath": "/api",
"schemes": ["http"],
"consumes": ["application/json"],
"produces": ["application/json"],
"parameters": {
"idParam": {
"name": "id",
"in": "path",
"description": "ID of pet to fetch",
"required": true,
"type": "integer",
"format": "int64"
},
"tag": {
"type": "string",
"in": "query",
"required": false
},
"query": {
"$ref": "#/parameters/tag"
}
},
"responses": {
"petResponse": {
"description": "pet response",
"schema": {
"$ref": "pet/pet.json#/definitions/pet"
}
},
"stringResponse": {
"descripion": "string response",
"schema": {
"type": "string"
}
},
"anotherPet": {
"$ref": "pet/pet.json#/responses/anotherPet"
},
"circularA": {
"$ref": "pet/pet.json#/responses/circularB"
}
},
"paths": {
"/": {
"get": {
"operationId": "indexStuff",
"responses": {
"default": {
"$ref": "#/responses/stringResponse"
},
"200": {
"$ref": "#/responses/anotherPet"
}
}
}
},
"/pets": {
"get": {
"description":
"Returns all pets from the system that the user has access to",
"operationId": "findPets",
"produces": [
"application/json",
"application/xml",
"text/xml",
"text/html"
],
"parameters": [
{
"name": "tags",
"in": "query",
"description": "tags to filter by",
"required": false,
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "csv"
},
{
"name": "limit",
"in": "query",
"description": "maximum number of results to return",
"required": false,
"type": "integer",
"format": "int32"
}
],
"responses": {
"200": {
"description": "pet response",
"schema": {
"type": "array",
"items": {
"$ref": "pet/pet.json#/definitions/pet"
}
}
},
"default": {
"description": "unexpected error",
"schema": {
"$ref": "#/definitions/errorModel"
}
}
}
},
"post": {
"description":
"Creates a new pet in the store. Duplicates are allowed",
"operationId": "addPet",
"produces": ["application/json"],
"parameters": [
{
"name": "pet",
"in": "body",
"description": "Pet to add to the store",
"required": true,
"schema": {
"$ref": "#/definitions/petInput"
}
}
],
"responses": {
"200": { "$ref": "#/responses/petResponse" },
"default": {
"description": "unexpected error",
"schema": {
"$ref": "#/definitions/errorModel"
}
}
}
}
},
"/pets/{id}": {
"get": {
"description":
"Returns a user based on a single ID, if the user does not have access to the pet",
"operationId": "findPetById",
"produces": [
"application/json",
"application/xml",
"text/xml",
"text/html"
],
"parameters": [
{
"$ref": "#/parameters/idParam"
}
],
"responses": {
"200": {
"$ref": "#/responses/petResponse"
},
"default": {
"description": "unexpected error",
"schema": {
"$ref": "#/definitions/errorModel"
}
}
}
},
"delete": {
"description": "deletes a single pet based on the ID supplied",
"operationId": "deletePet",
"parameters": [
{
"$ref": "#/parameters/idParam"
}
],
"responses": {
"204": {
"description": "pet deleted"
},
"default": {
"description": "unexpected error",
"schema": {
"$ref": "#/definitions/errorModel"
}
}
}
}
}
},
"definitions": {
"pet": {
"required": ["id", "name"],
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"name": {
"type": "string"
},
"tag": {
"type": "string"
}
}
},
"petInput": {
"allOf": [
{
"$ref": "pet/pet.json#/definitions/pet"
},
{
"required": ["name"],
"properties": {
"id": {
"type": "integer",
"format": "int64"
}
}
}
]
},
"errorModel": {
"required": ["code", "message"],
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
}
}
}
}
}

View File

@@ -0,0 +1,42 @@
{
"responses": {
"petResponse": {
"description": "pet response",
"schema": {
"$ref": "#/definitions/pet"
}
},
"stringResponse": {
"descripion": "string response",
"schema": {
"type": "string"
}
},
"circularB": {
"$ref": "#/responses/circularC"
},
"circularC": {
"$ref": "../all-the-things.json#/responses/circularA"
},
"anotherPet": {
"$ref": "#/responses/petResponse"
}
},
"definitions": {
"pet": {
"required": ["id", "name"],
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"name": {
"type": "string"
},
"tag": {
"type": "string"
}
}
}
}
}

View File

@@ -0,0 +1,6 @@
{
"type":"array",
"items": {
"type": "string"
}
}

View File

@@ -0,0 +1,3 @@
{
"type": "string"
}

View File

@@ -0,0 +1,224 @@
{
"swagger": "2.0",
"info": {
"version": "1.0.0",
"title": "Swagger Petstore",
"description": "A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification",
"termsOfService": "http://helloreverb.com/terms/",
"contact": {
"name": "Wordnik API Team"
},
"license": {
"name": "MIT"
}
},
"host": "petstore.swagger.wordnik.com",
"basePath": "/api",
"schemes": [
"http"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": {
"idParam": {
"name": "id",
"in": "path",
"description": "ID of pet to fetch",
"required": true,
"type": "integer",
"format": "int64"
}
},
"responses": {
"petResponse": {
"description": "pet response",
"schema": {
"$ref": "#/definitions/pet"
}
}
},
"paths": {
"/pets": {
"get": {
"description": "Returns all pets from the system that the user has access to",
"operationId": "findPets",
"produces": [
"application/json",
"application/xml",
"text/xml",
"text/html"
],
"parameters": [
{
"name": "tags",
"in": "query",
"description": "tags to filter by",
"required": false,
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "csv"
},
{
"name": "limit",
"in": "query",
"description": "maximum number of results to return",
"required": false,
"type": "integer",
"format": "int32"
}
],
"responses": {
"200": {
"description": "pet response",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/pet"
}
}
},
"default": {
"description": "unexpected error",
"schema": {
"$ref": "#/definitions/errorModel"
}
}
}
},
"post": {
"description": "Creates a new pet in the store. Duplicates are allowed",
"operationId": "addPet",
"produces": [
"application/json"
],
"parameters": [
{
"name": "pet",
"in": "body",
"description": "Pet to add to the store",
"required": true,
"schema": {
"$ref": "#/definitions/petInput"
}
}
],
"responses": {
"200": { "$ref": "#/responses/petResponse" },
"default": {
"description": "unexpected error",
"schema": {
"$ref": "#/definitions/errorModel"
}
}
}
}
},
"/pets/{id}": {
"get": {
"description": "Returns a user based on a single ID, if the user does not have access to the pet",
"operationId": "findPetById",
"produces": [
"application/json",
"application/xml",
"text/xml",
"text/html"
],
"parameters": [
{
"$ref": "#/parameters/idParam"
}
],
"responses": {
"200": {
"$ref": "#/responses/petResponse"
},
"default": {
"description": "unexpected error",
"schema": {
"$ref": "#/definitions/errorModel"
}
}
}
},
"delete": {
"description": "deletes a single pet based on the ID supplied",
"operationId": "deletePet",
"parameters": [
{
"$ref": "#/parameters/idParam"
}
],
"responses": {
"204": {
"description": "pet deleted"
},
"default": {
"description": "unexpected error",
"schema": {
"$ref": "#/definitions/errorModel"
}
}
}
}
}
},
"definitions": {
"pet": {
"required": [
"id",
"name"
],
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"name": {
"type": "string"
},
"tag": {
"type": "string"
}
}
},
"petInput": {
"allOf": [
{
"$ref": "pet"
},
{
"required": [
"name"
],
"properties": {
"id": {
"type": "integer",
"format": "int64"
}
}
}
]
},
"errorModel": {
"required": [
"code",
"message"
],
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
}
}
}
}
}

View File

@@ -0,0 +1,14 @@
{
"id": "http://localhost:1234",
"items": {
"id": "deeper/",
"items": {
"$ref": "stringProp.json"
}
},
"definitions": {
"bool": {
"$ref": "boolProp.json"
}
}
}

View File

@@ -0,0 +1,9 @@
{
"id": "http://localhost:1234",
"items": {
"id": "deeper/",
"items": {
"$ref": "arrayProp.json#/items"
}
}
}

View File

@@ -0,0 +1,103 @@
{
"swagger": "2.0",
"info": {
"version": "1.0",
"title": "To-do Demo",
"description":
"### Notes:\n\nThis OAS2 (Swagger 2) specification defines common models and responses, that other specifications may reference.\n\nFor example, check out the user poperty in the main.oas2 todo-partial model - it references the user model in this specification!\n\nLikewise, the main.oas2 operations reference the shared error responses in this common specification.",
"contact": {
"name": "Stoplight",
"url": "https://stoplight.io"
},
"license": {
"name": "MIT"
}
},
"host": "example.com",
"securityDefinitions": {},
"paths": {},
"responses": {
"401": {
"description": "",
"schema": {
"$ref": "#/definitions/error-response"
},
"examples": {
"application/json": {
"status": "401",
"error": "Not Authorized"
}
}
},
"403": {
"description": "",
"schema": {
"$ref": "#/definitions/error-response"
},
"examples": {
"application/json": {
"status": "403",
"error": "Forbbiden"
}
}
},
"404": {
"description": "",
"schema": {
"$ref": "#/definitions/error-response"
},
"examples": {
"application/json": {
"status": "404",
"error": "Not Found"
}
}
},
"500": {
"description": "",
"schema": {
"$ref": "#/definitions/error-response"
},
"examples": {
"application/json": {
"status": "500",
"error": "Server Error"
}
}
}
},
"definitions": {
"user": {
"title": "User",
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The user's full name."
},
"age": {
"type": "number",
"minimum": 0,
"maximum": 150
},
"error": {
"$ref": "#/definitions/error-response"
}
},
"required": ["name", "age"]
},
"error-response": {
"type": "object",
"title": "Error Response",
"properties": {
"status": {
"type": "string"
},
"error": {
"type": "string"
}
},
"required": ["status", "error"]
}
}
}

View File

@@ -0,0 +1,346 @@
{
"swagger": "2.0",
"info": {
"version": "1.0",
"title": "To-do Demo",
"description": "This OAS2 (Swagger 2) file represents a real API that lives at http://todos.stoplight.io.\n\nFor authentication information, click the apikey security scheme in the editor sidebar.",
"contact": {
"name": "Stoplight",
"url": "https://stoplight.io"
},
"license": {
"name": "MIT"
}
},
"host": "todos.stoplight.io",
"schemes": ["http"],
"consumes": ["application/json"],
"produces": ["application/json"],
"securityDefinitions": {
"Basic": {
"type": "basic"
},
"API Key": {
"type": "apiKey",
"name": "apikey",
"in": "query"
}
},
"paths": {
"/todos/{todoId}": {
"parameters": [{
"name": "todoId",
"in": "path",
"required": true,
"type": "string"
}],
"get": {
"operationId": "GET_todo",
"summary": "Get Todo",
"tags": ["Todos"],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/todo-full"
},
"examples": {
"application/json": {
"id": 1,
"name": "get food",
"completed": false,
"completed_at": "1955-04-23T13:22:52.685Z",
"created_at": "1994-11-05T03:26:51.471Z",
"updated_at": "1989-07-29T11:30:06.701Z"
},
"/todos/foobar": "{\n\t\"foo\": \"bar\"\n}\n",
"/todos/chores": {
"id": 9000,
"name": "Do Chores",
"completed": false,
"created_at": "2014-08-28T14:14:28.494Z",
"updated_at": "2014-08-28T14:14:28.494Z"
},
"new": {
"name": "esse qui proident labore",
"completed": null,
"id": 920778,
"completed_at": "2014-01-07T07:49:55.123Z",
"created_at": "1948-04-21T12:04:21.282Z",
"updated_at": "1951-12-19T11:10:34.039Z",
"user": {
"name": "irure deserunt fugiat",
"age": 121.45395681110494
},
"float": -47990796.228164576
}
}
},
"404": {
"$ref": "./todos.common.json#/responses/404"
},
"500": {
"$ref": "./todos.common.json#/responses/500"
}
},
"parameters": [{
"in": "query",
"name": "",
"type": "string"
}]
},
"put": {
"operationId": "PUT_todos",
"summary": "Update Todo",
"tags": ["Todos"],
"parameters": [{
"name": "body",
"in": "body",
"schema": {
"$ref": "#/definitions/todo-partial",
"example": {
"name": "my todo's new name",
"completed": false
}
}
}],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/todo-full"
},
"examples": {
"application/json": {
"id": 9000,
"name": "It's Over 9000!!!",
"completed": true,
"completed_at": null,
"created_at": "2014-08-28T14:14:28.494Z",
"updated_at": "2015-08-28T14:14:28.494Z"
}
}
},
"401": {
"$ref": "./todos.common.json#/responses/401"
},
"404": {
"$ref": "./todos.common.json#/responses/404"
},
"500": {
"$ref": "./todos.common.json#/responses/500"
}
},
"security": [{
"Basic": []
},
{
"API Key": []
}
]
},
"delete": {
"operationId": "DELETE_todo",
"summary": "Delete Todo",
"tags": ["Todos"],
"responses": {
"204": {
"description": ""
},
"401": {
"$ref": "./todos.common.json#/responses/401"
},
"404": {
"$ref": "./todos.common.json#/responses/404"
},
"500": {
"$ref": "./todos.common.json#/responses/500"
}
},
"security": [{
"Basic": []
},
{
"API Key": []
}
]
}
},
"/todos": {
"post": {
"operationId": "POST_todos",
"summary": "Create Todo",
"tags": ["Todos"],
"parameters": [{
"name": "body",
"in": "body",
"schema": {
"$ref": "#/definitions/todo-partial",
"example": {
"name": "my todo's name",
"completed": false
}
}
}],
"responses": {
"201": {
"description": "",
"schema": {
"$ref": "#/definitions/todo-full"
},
"examples": {
"application/json": {
"id": 9000,
"name": "It's Over 9000!!!",
"completed": null,
"completed_at": null,
"created_at": "2014-08-28T14:14:28.494Z",
"updated_at": "2014-08-28T14:14:28.494Z"
},
"/todos/chores": {
"id": 9000,
"name": "Do Chores",
"completed": false,
"created_at": "2014-08-28T14:14:28.494Z",
"updated_at": "2014-08-28T14:14:28.494Z"
}
}
},
"401": {
"$ref": "./todos.common.json#/responses/401"
},
"500": {
"$ref": "./todos.common.json#/responses/500"
}
},
"security": [{
"API Key": []
},
{
"Basic": []
}
],
"description": "This creates a Todo object.\n\nTesting `inline code`."
},
"get": {
"operationId": "GET_todos",
"summary": "List Todos",
"tags": ["Todos"],
"parameters": [{
"$ref": "#/parameters/limit"
},
{
"$ref": "#/parameters/skip"
}
],
"responses": {
"200": {
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/todo-full"
}
},
"examples": {
"application/json": [{
"id": 1,
"name": "design the thingz",
"completed": true
},
{
"id": 2,
"name": "mock the thingz",
"completed": true
},
{
"id": 3,
"name": "code the thingz",
"completed": false
}
],
"empty": []
},
"headers": {
"foo": {
"type": "string",
"default": "bar"
}
}
},
"500": {
"$ref": "./todos.common.json#/responses/500"
}
},
"description": ""
}
}
},
"parameters": {
"limit": {
"name": "limit",
"in": "query",
"description": "This is how it works.",
"required": false,
"type": "integer",
"maximum": 100
},
"skip": {
"name": "skip",
"in": "query",
"required": false,
"type": "string"
}
},
"definitions": {
"todo-partial": {
"title": "Todo Partial",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"completed": {
"type": ["boolean", "null"]
}
},
"required": ["name", "completed"]
},
"todo-full": {
"title": "Todo Full",
"allOf": [{
"$ref": "#/definitions/todo-partial"
},
{
"type": "object",
"properties": {
"id": {
"type": "integer",
"minimum": 0,
"maximum": 1000000
},
"completed_at": {
"type": ["string", "null"],
"format": "date-time"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
},
"user": {
"$ref": "./todos.common.json#/definitions/user"
}
},
"required": ["id", "user"]
}
]
}
},
"tags": [{
"name": "Todos"
}]
}