apibuilder swagger 0.14.84

Specification of swagger using the apibuilder format

  • Contact: N/A
  • License: N/A

Resources

No resources

Headers

No headers

Imports

No imports

Enums

api_key_in_type

Name Value Description
query query

header header

collection_format_type

Name Value Description
csv csv

ssv ssv

tsv tsv

pipes pipes

format_type

Name Value Description
binary binary

byte byte

date date

date-time date-time

double double

float float

int32 int32

int64 int64

password password

items_type

Name Value Description
string string

number number

integer integer

boolean boolean

array array

parameter_in_type

Name Value Description
query query

header header

path path

formData formData

body body

security_scheme_type

Name Value Description
basic basic

apiKey apiKey

oauth2 oauth2

Models

contact

Example Json: Minimal | Full
Field Type Required? Default Description
name string No -

url string No -

email string No -

external_documentation

Example Json: Minimal | Full
Field Type Required? Default Description
description string No -

url string Yes -

header

Example Json: Minimal | Full

TODO: Can this be a union type with items?

Field Type Required? Default Description
description string No -

type items_type Yes -

format format_type No -

items items No -

NOTE: This is required if type is ‘array’

collectionFormat collection_format_type No -

default object No -

maximum long No -

exclusiveMaximum boolean No -

minimum long No -

exclusiveMinimum boolean No -

maxLength integer No -

minLength integer No -

pattern string No -

maxItems integer No -

minItems integer No -

uniqueItems boolean No -

enum [object] No -

multipleOf long No -

info

Example Json: Minimal | Full
Field Type Required? Default Description
title string Yes -

description string No -

termsOfService string No -

contact contact No -

license license No -

version string Yes -

items

Example Json: Minimal | Full
Field Type Required? Default Description
type items_type Yes -

format format_type No -

items items No -

NOTE: This is required if type is ‘array’

collectionFormat collection_format_type No -

default object No -

maximum long No -

exclusiveMaximum boolean No -

minimum long No -

exclusiveMinimum boolean No -

maxLength integer No -

minLength integer No -

pattern string No -

maxItems integer No -

minItems integer No -

uniqueItems boolean No -

enum [object] No -

multipleOf long No -

license

Example Json: Minimal | Full
Field Type Required? Default Description
name string Yes -

url string No -

operation

Example Json: Minimal | Full
Field Type Required? Default Description
tags [string] No -

summary string No -

description string No -

externalDocs external_documentation No -

operationId string No -

consumes [string] No -

produces [string] No -

parameters [parameter_or_ref] No -

responses map[response_or_ref] Yes -

schemes [string] No -

deprecated boolean No -

security [map[[string]]] No -

parameter

Example Json: Minimal | Full

TODO: This might need to be a complex union type, given the different requirements based on the ‘in’ property. http://swagger.io/specification/#parameterObject

Field Type Required? Default Description
name string Yes -

in parameter_in_type Yes -

description string No -

required boolean Yes -

schema schema No -

type string No -

format string No -

allowEmptyValue boolean No -

items items No -

collectionFormat collection_format_type No -

default object No -

maximum long No -

exclusiveMaximum boolean No -

minimum long No -

exclusiveMinimum boolean No -

maxLength integer No -

minLength integer No -

pattern string No -

maxItems integer No -

minItems integer No -

uniqueItems boolean No -

enum [object] No -

multipleOf long No -

path_item

Example Json: Minimal | Full
Field Type Required? Default Description
ref string No -

TODO: Needs to be named ‘$ref’

get operation No -

put operation No -

post operation No -

delete operation No -

options operation No -

head operation No -

patch operation No -

parameters [parameter_or_ref] No -

reference

Example Json: Minimal | Full
Field Type Required? Default Description
ref string Yes -

TODO: Needs to be named ‘$ref’

response

Example Json: Minimal | Full
Field Type Required? Default Description
description string Yes -

schema schema No -

headers map[header] No -

examples object No -

schema

Example Json: Minimal | Full
Field Type Required? Default Description
ref string No -

TODO: Needs to be named ‘$ref’

format format_type No -

title string No -

description string No -

default object No -

multipleOf long No -

maximum long No -

exclusiveMaximum boolean No -

minimum long No -

exclusiveMinimum boolean No -

maxLength integer No -

minLength integer No -

pattern string No -

maxItems integer No -

minItems integer No -

uniqueItems boolean No -

maxProperties integer No -

minProperties integer No -

required [string] No -

enum [object] No -

type [string] No -

items schema No -

TODO: figure out if this also needs to support boolean (http://json-schema.org/latest/json-schema-validation.html#rfc.section.5.9). It’s possible that a uni-directional approach may allow us to avoid supporting this odd type.

allOf [schema] No -

properties map[schema] No -

additionalProperties schema No -

TODO: figure out if this also needs to support boolean (http://json-schema.org/latest/json-schema-validation.html#rfc.section.5.18). It’s possible that a uni-directional approach may allow us to avoid supporting this odd type.

discriminator string No -

readOnly boolean No -

xml xml No -

externalDocs external_documentation No -

example object No -

security_scheme

Example Json: Minimal | Full

TODO: Consider making this a union type of the three different schemes (and their required fields)

Field Type Required? Default Description
type security_scheme_type Yes -

description string No -

name string No -

Required for apiKey

in api_key_in_type No -

Required for apiKey

flow string No -

Required for oauth2

authorizationUrl string No -

Required for oauth2

tokenUrl string No -

Required for oauth2

scopes map[string] No -

Required for oauth2

swagger

Example Json: Minimal | Full
Field Type Required? Default Description
swagger string Yes -

info info Yes -

host string No -

basePath string No -

schemes [string] No -

consumes [string] No -

produces [string] No -

paths map[path_item] Yes -

definitions map[schema] No -

parameters map[parameter] No -

responses map[response] No -

securityDefinitions map[security_scheme] No -

security map[string] No -

tags [tag] No -

externalDocs external_documentation No -

tag

Example Json: Minimal | Full
Field Type Required? Default Description
name string Yes -

description string No -

externalDocs external_documentation No -

xml

Example Json: Minimal | Full
Field Type Required? Default Description
name string No -

namespace string No -

prefix string No -

attribute boolean No -

wrapped boolean No -

Unions

parameter_or_ref

  • Type discriminator: N/A
Type Discriminator Value Example Json Description
parameter parameter Minimal | Full

reference reference Minimal | Full

response_or_ref

  • Type discriminator: N/A
Type Discriminator Value Example Json Description
response response Minimal | Full

reference reference Minimal | Full

Annotations

No annotations