Skip to content

Latest commit

 

History

History
88 lines (83 loc) · 4.08 KB

1.md

File metadata and controls

88 lines (83 loc) · 4.08 KB
JSON YAML
{
  "title": "Swagger Sample App",
  "description": "This is a sample server Petstore server.",
  "termsOfService": "http://swagger.io/terms/",
  "contact": {
    "name": "API Support",
    "url": "http://www.swagger.io/support",
    "email": "[email protected]"
  },
  "license": {
    "name": "Apache 2.0",
    "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
  },
  "version": "1.0.1"
 }
  title: "Swagger Sample App"
  description: "This is a sample server Petstore server."
  termsOfService: "http://swagger.io/terms/"
  contact: 
    name: "API Support"
    url: "http://www.swagger.io/support"
    email: "[email protected]"
  license: 
    name: "Apache 2.0"
    url: "http://www.apache.org/licenses/LICENSE-2.0.html"
  version: "1.0.1"
{
  "title": "Swagger Sample App",
  "description": "This is a sample server Petstore server.",
  "termsOfService": "http://swagger.io/terms/",
  "contact": {
    "name": "API Support",
    "url": "http://www.swagger.io/support",
    "email": "[email protected]"
  },
  "license": {
    "name": "Apache 2.0",
    "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
  },
  "version": "1.0.1"
 }
 title: "Swagger Sample App"
 description: "This is a sample server Petstore server."
 termsOfService: "http://swagger.io/terms/"
 contact: 
   name: "API Support"
   url: "http://www.swagger.io/support"
   email: "[email protected]"
 license: 
   name: "Apache 2.0"
   url: "http://www.apache.org/licenses/LICENSE-2.0.html"
 version: "1.0.1"
Title 1 Title 2
hello world
hello world
Field Name Type Validity Description
type string Any Required (if $ref is not used). The return type of the operation. The value MUST be one of the Primitves, array or a model's id.
$ref string Any Required (if type is not used). The Model to be used. The value MUST be a model's id.
format string primitive Fine-tuned primitive type definition. See Primitives for further information. The value MUST be one that is defined under Primitives, corresponding to the right primitive type.
defaultValue special primitive The default value to be used for the field. The value type MUST conform with the primitive's type value.
enum [string] string A fixed list of possible values. If this field is used in conjunction with the defaultValue field, then the default value MUST be one of the values defined in the enum.
minimum string number, integer The minimum valid value for the type, inclusive. If this field is used in conjunction with the defaultValue field, then the default value MUST be higher than or equal to this value. The value type is string and should represent the minimum numeric value. Note: This will change to a numeric value in the future.
maximum string number, integer The maximum valid value for the type, inclusive. If this field is used in conjunction with the defaultValue field, then the default value MUST be lower than or equal to this value. The value type is string and should represent the maximum numeric value. Note: This will change to a numeric value in the future.
items Items Object array Required. The type definition of the values in the container. A container MAY NOT be nested in another container.
uniqueItems boolean array A flag to note whether the container allows duplicate values or not. If the value is set to true, then the array acts as a set.