|
| 1 | +# Minimal instances of Objects defined in the OpenAPI specification |
| 2 | +# |
| 3 | +# Each instance includes only the required properties for that Object. |
| 4 | +# These instances are used to verify that the Object does not allow additional properties. |
| 5 | + |
| 6 | +# OpenAPI Object has separate test cases |
| 7 | + |
| 8 | +- objectName: Info Object |
| 9 | + subSchemaPath: /$defs/info |
| 10 | + minimalInstance: |
| 11 | + title: Sample API |
| 12 | + version: 1.0.0 |
| 13 | + |
| 14 | +- objectName: Contact Object |
| 15 | + subSchemaPath: /$defs/contact |
| 16 | + minimalInstance: {} |
| 17 | + |
| 18 | +- objectName: License Object |
| 19 | + subSchemaPath: /$defs/license |
| 20 | + minimalInstance: |
| 21 | + name: Apache 2.0 |
| 22 | + |
| 23 | +- objectName: Server Object |
| 24 | + subSchemaPath: /$defs/server |
| 25 | + minimalInstance: |
| 26 | + url: https://example.com/docs |
| 27 | + |
| 28 | +- objectName: Server Variable Object |
| 29 | + subSchemaPath: /$defs/server-variable |
| 30 | + minimalInstance: |
| 31 | + default: defaultValue |
| 32 | + |
| 33 | +- objectName: Components Object |
| 34 | + subSchemaPath: /$defs/components |
| 35 | + minimalInstance: {} |
| 36 | + |
| 37 | +- objectName: Paths Object |
| 38 | + subSchemaPath: /$defs/paths |
| 39 | + minimalInstance: {} |
| 40 | + |
| 41 | +- objectName: Path Item Object |
| 42 | + subSchemaPath: /$defs/path-item |
| 43 | + minimalInstance: {} |
| 44 | + |
| 45 | +- objectName: Operation Object |
| 46 | + subSchemaPath: /$defs/operation |
| 47 | + minimalInstance: {} |
| 48 | + |
| 49 | +- objectName: External Documentation Object |
| 50 | + subSchemaPath: /$defs/external-documentation |
| 51 | + minimalInstance: |
| 52 | + url: https://example.com/docs |
| 53 | + |
| 54 | +- objectName: Parameter Object |
| 55 | + subSchemaPath: /$defs/parameter |
| 56 | + minimalInstance: |
| 57 | + name: sampleParam |
| 58 | + in: query |
| 59 | + schema: # content could also be used, one of them is required |
| 60 | + type: string |
| 61 | + |
| 62 | +- objectName: Request Body Object |
| 63 | + subSchemaPath: /$defs/request-body |
| 64 | + minimalInstance: |
| 65 | + content: |
| 66 | + application/json: |
| 67 | + schema: |
| 68 | + type: object |
| 69 | + |
| 70 | +- objectName: Media Type Object |
| 71 | + subSchemaPath: /$defs/media-type |
| 72 | + minimalInstance: {} |
| 73 | + |
| 74 | +- objectName: Encoding Object |
| 75 | + subSchemaPath: /$defs/encoding |
| 76 | + minimalInstance: {} |
| 77 | + |
| 78 | +- objectName: Responses Object |
| 79 | + subSchemaPath: /$defs/responses |
| 80 | + minimalInstance: |
| 81 | + default: {} # or "200": {}, any response would do, Responses Object requires at least one response |
| 82 | + |
| 83 | +- objectName: Response Object |
| 84 | + subSchemaPath: /$defs/response |
| 85 | + minimalInstance: {} |
| 86 | + |
| 87 | +- objectName: Callback Object |
| 88 | + subSchemaPath: /$defs/callbacks |
| 89 | + minimalInstance: {} |
| 90 | + |
| 91 | +- objectName: Example Object |
| 92 | + subSchemaPath: /$defs/example |
| 93 | + minimalInstance: {} |
| 94 | + |
| 95 | +- objectName: Link Object |
| 96 | + subSchemaPath: /$defs/link |
| 97 | + minimalInstance: |
| 98 | + operationId: sampleOperation # operationRef could also be used, one of them is required |
| 99 | + |
| 100 | +- objectName: Header Object |
| 101 | + subSchemaPath: /$defs/header |
| 102 | + minimalInstance: |
| 103 | + schema: # content could also be used, one of them is required |
| 104 | + type: string |
| 105 | + |
| 106 | +- objectName: Tag Object |
| 107 | + subSchemaPath: /$defs/tag |
| 108 | + minimalInstance: |
| 109 | + name: Sample Tag |
| 110 | + |
| 111 | +# Reference Object allows additional properties (which SHALL be ignored) |
| 112 | + |
| 113 | +# Schema Object allows additional properties |
| 114 | + |
| 115 | +# Discriminator Object is defined in meta.yaml, test case fail/discriminator-unexpected-property.yaml |
| 116 | + |
| 117 | +# XML Object is defined in meta.yaml |
| 118 | + |
| 119 | +- objectName: Security Scheme Object (HTTP Basic) |
| 120 | + subSchemaPath: /$defs/security-scheme |
| 121 | + minimalInstance: |
| 122 | + type: http |
| 123 | + scheme: basic |
| 124 | + |
| 125 | +- objectName: OAuth Flows Object |
| 126 | + subSchemaPath: /$defs/oauth-flows |
| 127 | + minimalInstance: {} |
| 128 | + |
| 129 | +- objectName: OAuth Flow Object (implicit) |
| 130 | + subSchemaPath: /$defs/oauth-flows/$defs/implicit |
| 131 | + minimalInstance: |
| 132 | + authorizationUrl: https://example.com/auth |
| 133 | + scopes: {} |
| 134 | + |
| 135 | +- objectName: OAuth Flow Object (password) |
| 136 | + subSchemaPath: /$defs/oauth-flows/$defs/password |
| 137 | + minimalInstance: |
| 138 | + tokenUrl: https://example.com/token |
| 139 | + scopes: {} |
| 140 | + |
| 141 | +- objectName: OAuth Flow Object (clientCredentials) |
| 142 | + subSchemaPath: /$defs/oauth-flows/$defs/client-credentials |
| 143 | + minimalInstance: |
| 144 | + tokenUrl: https://example.com/token |
| 145 | + scopes: {} |
| 146 | + |
| 147 | +- objectName: OAuth Flow Object (authorizationCode) |
| 148 | + subSchemaPath: /$defs/oauth-flows/$defs/authorization-code |
| 149 | + minimalInstance: |
| 150 | + authorizationUrl: https://example.com/auth |
| 151 | + tokenUrl: https://example.com/token |
| 152 | + scopes: {} |
| 153 | + |
| 154 | +- objectName: OAuth Flow Object (deviceAuthorization) |
| 155 | + subSchemaPath: /$defs/oauth-flows/$defs/device-authorization |
| 156 | + minimalInstance: |
| 157 | + deviceAuthorizationUrl: https://example.com/device |
| 158 | + tokenUrl: https://example.com/auth |
| 159 | + scopes: {} |
| 160 | + |
| 161 | +# Security Requirement Object allows additional properties |
0 commit comments