Skip to content

Instantly share code, notes, and snippets.

@dtkav
Created September 4, 2020 02:15
Show Gist options
  • Save dtkav/1e40db511a80ca4a545fa4519a8d9adf to your computer and use it in GitHub Desktop.
Save dtkav/1e40db511a80ca4a545fa4519a8d9adf to your computer and use it in GitHub Desktop.
required and nullable repro
openapi: 3.0.1
info:
title: test API
version: 2.0.0
license:
name: Apache 2.0
url: 'http://www.apache.org/licenses/LICENSE-2.0.html'
servers:
- url: '/api/v1/'
paths:
'/cat':
post:
operationId: createCat
requestBody:
content:
application/json:
schema:
"$ref": "#/components/schemas/Cat"
responses:
"201":
description: Created
content:
application/json:
schema:
"$ref": "#/components/schemas/Cat"
components:
schemas:
Cat:
type: object
properties:
id:
type: string
nullable: true
required:
- id
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment