File: allof_with_required_inherited_edge_cases.yaml

package info (click to toggle)
python-datamodel-code-generator 0.55.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 15,792 kB
  • sloc: python: 44,931; makefile: 22
file content (116 lines) | stat: -rw-r--r-- 3,066 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
openapi: "3.0.0"
info:
  title: Test API - Edge Cases for allOf Inheritance
  version: 1.0.0
paths: {}
components:
  schemas:
    BaseRef:
      type: object
      properties:
        id:
          type: integer

    StatusEnum:
      type: string
      enum:
        - active
        - inactive

    ProjectedEdgeCases:
      type: object
      properties:
        single_allof_primitive:
          allOf:
            - type: string
        single_allof_ref:
          allOf:
            - $ref: '#/components/schemas/BaseRef'
        allof_with_enum:
          allOf:
            - $ref: '#/components/schemas/StatusEnum'
            - description: "enum with description"
        allof_nested_anyof:
          allOf:
            - anyOf:
                - type: string
                - type: integer
            - description: "nested anyOf"
        allof_constraint_only:
          allOf:
            - minLength: 1
            - maxLength: 100
        allof_max_constraints:
          allOf:
            - type: integer
              maximum: 100
            - maximum: 50
        allof_unique_items:
          allOf:
            - type: array
              items:
                type: string
              uniqueItems: true
            - uniqueItems: false
        object_without_additional:
          type: object
          properties:
            nested:
              type: string
        object_only_type:
          type: object
        multiple_additional_props:
          allOf:
            - type: object
              additionalProperties:
                type: string
            - type: object
              additionalProperties:
                $ref: '#/components/schemas/BaseRef'
        depth_limit_test:
          type: object
          properties:
            l1:
              type: object
              properties:
                l2:
                  type: object
                  properties:
                    l3:
                      type: object
                      properties:
                        l4:
                          type: string
        cycle_detection:
          $ref: '#/components/schemas/BaseRef'
        type_list_field:
          type:
            - string
            - integer
        allof_multiple_refs_only:
          allOf:
            - $ref: '#/components/schemas/BaseRef'
            - $ref: '#/components/schemas/BaseRef'

    EdgeCases:
      allOf:
        - $ref: '#/components/schemas/ProjectedEdgeCases'
        - type: object
          required:
            - single_allof_primitive
            - single_allof_ref
            - allof_with_enum
            - allof_nested_anyof
            - allof_constraint_only
            - allof_max_constraints
            - allof_unique_items
            - object_without_additional
            - object_only_type
            - multiple_additional_props
            - depth_limit_test
            - cycle_detection
            - type_list_field
            - allof_multiple_refs_only
          properties:
            extra:
              type: string