-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Interfaces without a mutable member do not generate a Put or a MergePatch component, but they do create the references to them, producing invalid spec.
Reproducible example:
TargetOptions:
description: |
The export target configuration options. These vary by connection type.
discriminator:
propertyName: connection_type
oneOf:
- $interface: "TargetOptionsBigQuery#SameAsInterface"
- $interface: "TargetOptionsHostedApi#SameAsInterface"
- $interface: "TargetOptionsHostedCsv#SameAsInterface"
- $interface: "TargetOptionsRedshift#SameAsInterface"
- $interface: "TargetOptionsS3Csv#SameAsInterface"
...
TargetOptionsHostedApi:
description: "Hosted API publication target configuration options."
members:
connection_type:
required: true
initializable: true
mutable: false
schema:
const: hosted_api
type: string
this produces:
TargetOptionsMergePatch:
oneOf:
- $ref: "#/components/schemas/TargetOptionsBigQueryMergePatch"
- $ref: "#/components/schemas/TargetOptionsHostedApiMergePatch"
- $ref: "#/components/schemas/TargetOptionsHostedCsvMergePatch"
- $ref: "#/components/schemas/TargetOptionsRedshiftMergePatch"
- $ref: "#/components/schemas/TargetOptionsS3CsvMergePatch"
discriminator:
propertyName: connection_type
...
TargetOptionsPut:
oneOf:
- $ref: "#/components/schemas/TargetOptionsBigQueryPut"
- $ref: "#/components/schemas/TargetOptionsHostedApiPut"
- $ref: "#/components/schemas/TargetOptionsHostedCsvPut"
- $ref: "#/components/schemas/TargetOptionsRedshiftPut"
- $ref: "#/components/schemas/TargetOptionsS3CsvPut"
discriminator:
propertyName: connection_type
However, neither TargetOptionsHostedApiPut nor TargetOptionsHostedApiMergePatch are generated.
Metadata
Metadata
Assignees
Labels
No labels