mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-05-28 04:20:51 +00:00
* add sample spec for oneof and anyof with required properties * omit bytes import for oneOf and anyOf models * generate sample client for new spec
38 lines
904 B
YAML
38 lines
904 B
YAML
openapi: 3.0.0
|
|
info:
|
|
title: Test
|
|
version: 1.0.0
|
|
servers:
|
|
- url: /
|
|
paths: {}
|
|
components:
|
|
schemas:
|
|
NestedObject1:
|
|
properties:
|
|
field1:
|
|
description: Specifies an action name to be used with the Android Intent
|
|
class.
|
|
type: string
|
|
required:
|
|
- field1
|
|
NestedObject2:
|
|
properties:
|
|
field2:
|
|
description: Specifies an action name to be used with the Android Intent
|
|
class.
|
|
type: string
|
|
required:
|
|
- field2
|
|
Object:
|
|
oneOf:
|
|
- $ref: '#/components/schemas/NestedObject1'
|
|
- $ref: '#/components/schemas/NestedObject2'
|
|
Object2:
|
|
anyOf:
|
|
- $ref: '#/components/schemas/NestedObject1'
|
|
- $ref: '#/components/schemas/NestedObject2'
|
|
Object3:
|
|
allOf:
|
|
- $ref: '#/components/schemas/NestedObject1'
|
|
- $ref: '#/components/schemas/NestedObject2'
|