File: override_required_all_of.yaml

package info (click to toggle)
python-datamodel-code-generator 0.34.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,376 kB
  • sloc: python: 19,882; makefile: 15
file content (41 lines) | stat: -rw-r--r-- 1,099 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
openapi: "3.0.0"
components:
  schemas:
    ObjectBase:
      description: Object schema
      type: object
      properties:
        name:
          description: Name of the object
          type: string
        type:
          description: Object type
          type: string
          enum:
            - my_first_object
            - my_second_object
        rank:
          description: User rank
          type:
            - integer
            - number
        allIn:
          oneOf:
            - $ref: '#/components/schemas/ObjectBase/properties/name'
            - $ref: '#/components/schemas/ObjectBase/properties/type'
            - $ref: '#/components/schemas/ObjectBase/properties/rank'
    CreateObjectRequest:
      description: Request schema for object creation
      type: object
      allOf:
        - $ref: '#/components/schemas/ObjectBase'
      required:
        - name
        - type
        - rank
        - allIn
    UpdateObjectRequest:
      description: Request schema for object updates
      type: object
      allOf:
        - $ref: '#/components/schemas/ObjectBase'