Created
July 31, 2018 11:07
-
-
Save grEvenX/089a8c9ecf029560299523ff048cfd5b to your computer and use it in GitHub Desktop.
Example case for using date-time property in openapi 3.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openapi: "3.0.0" | |
info: | |
version: 1.0.0 | |
title: Swagger Petstore | |
license: | |
name: MIT | |
servers: | |
- url: http://petstore.swagger.io/v1 | |
paths: | |
/pets: | |
post: | |
description: Creates a new pet in the store. Duplicates are allowed | |
operationId: addPet | |
requestBody: | |
description: Pet to add to the store | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/NewPet' | |
components: | |
schemas: | |
NewPet: | |
properties: | |
born_at: | |
type: string | |
format: date-time | |
animal: | |
type: string | |
default: cat |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment