You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe your request
Instead of adding properties that are required in a reslang structure to the required list for the parent Component, the required list should be on the child Components in case multiple structures in the union have the same properties, but the properties have different required-ness.
For example consider:
union MyUnion {
s1: Struct1
s2: Struct2
}
If Struct1 and Struct2 both have sharedProp, but sharedProp is optional in Struct2, then the required list for MyUnion shouldn't include sharedProp, but the required list for Struct1should:
By contrast, with the current code, MyUnion would look something like this
MyUnion:
type: object
properties:
type:
type: string
discriminator:
propertyName: type
mapping:
s1: '#/components/schemas/MyUnionS1'
s2: '#/components/schemas/MyUnionS2'
required:
- type
- sharedProp
and there would be no required list for MyUnionS1 nor MyUnionS2.
Describe the value this feature would provide
This would disambiguate which values are required for which Components and make the generated OpenAPI spec closer to the likely intent of the auther of the reslang.
The text was updated successfully, but these errors were encountered:
Describe your request
Instead of adding properties that are required in a reslang
structure
to therequired
list for the parent Component, therequired
list should be on the child Components in case multiplestructure
s in the union have the same properties, but the properties have different required-ness.For example consider:
If
Struct1
andStruct2
both havesharedProp
, butsharedProp
isoptional
inStruct2
, then therequired
list forMyUnion
shouldn't includesharedProp
, but therequired
list forStruct1
should:By contrast, with the current code,
MyUnion
would look something like thisand there would be no
required
list forMyUnionS1
norMyUnionS2
.Describe the value this feature would provide
This would disambiguate which values are required for which Components and make the generated OpenAPI spec closer to the likely intent of the auther of the reslang.
The text was updated successfully, but these errors were encountered: