fix: entries as property name (#6025)

This commit is contained in:
Tim Lai
2020-05-20 11:54:57 -07:00
committed by GitHub
parent b85ae033ab
commit 3a65070bf5
4 changed files with 76 additions and 1 deletions

View File

@@ -0,0 +1,28 @@
swagger: "2.0"
info:
description: "OAS2 sample with entries as property name"
version: "0.0.1"
title: "Swagger Sample"
paths:
/pet:
post:
summary: "Add a new pet to the store"
description: ""
parameters:
- in: "body"
name: "body"
schema:
$ref: "#/definitions/Pet"
responses:
"405":
description: "Invalid input"
definitions:
Pet:
type: "object"
properties:
id:
type: "integer"
entries: # <-- evaluate
type: "array"
items:
type: "string"

View File

@@ -0,0 +1,31 @@
openapi: 3.0.2
info:
title: OAS 3.0 sample with entries as property name
version: 0.1.0
paths:
/test/:
get:
summary: Test
operationId: test_test__get
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/Testmodel'
components:
schemas:
Testmodel:
title: Testmodel
required:
- name
- entries
type: object
properties:
name:
title: Name
type: string
entries:
title: Entries
type: integer