UNPKG

openapi-directory

Version:

Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS

1 lines 2.56 kB
{"openapi":"3.0.0","servers":[{"url":"https://vtex.local"},{"description":"VTEX server url","url":"https://{accountName}.{environment}.com.br","variables":{"accountName":{"default":"{accountName}","description":"Your VTEX account name"},"environment":{"default":"{environment}","enum":["vtexcommercestable","myvtex"]}}}],"info":{"license":{"name":"MIT"},"title":"Pets Api","version":"1.0.0","x-origin":[{"format":"openapi","url":"https://raw.githubusercontent.com/vtex/openapi-schemas/master/VTEX_TEMPLATE.json","version":"3.0"}],"x-providerName":"vtex.local","x-serviceName":"VTEX_TEMPLATE"},"security":[{"appKey":[],"appToken":[]}],"paths":{"/pets":{"get":{"operationId":"listPets","parameters":[{"description":"How many items to return at one time (max 100)","in":"query","name":"limit","required":false,"schema":{"format":"int32","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pets"}}},"description":"An paged array of pets","headers":{"x-next":{"description":"A link to the next page of responses","schema":{"type":"string"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected error"}},"summary":"List all pets","tags":["pets"]},"post":{"operationId":"createPets","responses":{"201":{"description":"Null response"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected error"}},"summary":"Create a pet","tags":["pets"]}},"/pets/{petId}":{"get":{"operationId":"showPetById","parameters":[{"description":"The id of the pet to retrieve","in":"path","name":"petId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pets"}}},"description":"Expected response to a valid request"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"unexpected error"}},"summary":"Info for a specific pet","tags":["pets"]}}},"components":{"schemas":{"Error":{"properties":{"code":{"format":"int32","type":"integer"},"message":{"type":"string"}},"required":["code","message"]},"Pet":{"properties":{"id":{"format":"int64","type":"integer"},"name":{"type":"string"},"tag":{"type":"string"}},"required":["id","name"]},"Pets":{"items":{"$ref":"#/components/schemas/Pet"},"type":"array"}},"securitySchemes":{"appKey":{"in":"header","name":"X-VTEX-API-AppKey","type":"apiKey"},"appToken":{"in":"header","name":"X-VTEX-API-AppToken","type":"apiKey"}}}}