Skip to content

Instantly share code, notes, and snippets.

@amakhrov
Last active February 10, 2020 17:48
Show Gist options
  • Save amakhrov/afffafeac2afe4021bab03cf5199263a to your computer and use it in GitHub Desktop.
Save amakhrov/afffafeac2afe4021bab03cf5199263a to your computer and use it in GitHub Desktop.
openapi: 3.0.2
info:
title: TEST
version: "1.0"
paths:
/test:
post:
operationId: test
responses:
200:
description: result
content:
'application/json':
schema:
type: array
items:
$ref: '#/components/schemas/AeItemVO'
components:
schemas:
AeItemVO:
required:
- itemTypeId
- textValue
- itemType
type: object
properties:
id:
type: integer
format: int32
uuid:
type: string
itemType:
type: string
itemTypeId:
type: integer
format: int32
itemSpecId:
type: integer
format: int32
textValue:
type: string
discriminator:
propertyName: itemType
mapping:
AeItemInteger: '#/components/schemas/AeItemIntegerVO'
AeItemString: '#/components/schemas/AeItemStringVO'
AeItemIntegerVO:
allOf:
- $ref: '#/components/schemas/AeItemVO'
- type: object
properties:
value:
type: integer
format: int32
required:
- value
AeItemStringVO:
allOf:
- $ref: '#/components/schemas/AeItemVO'
- type: object
properties:
value:
type: string
required:
- value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment