Charles Treatman d0ed25a06d
[Go] fix unused bytes import for anyOf and oneOf models (#17775)
* add sample spec for oneof and anyof with required properties

* omit bytes import for oneOf and anyOf models

* generate sample client for new spec
2024-02-06 17:05:39 +08:00

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'