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
{{ message }}
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.
The Metal API spec has a number of inline enum definitions. There's a bug in the Go generator that treats these inline enums as strings instead of creating a Go enum for them: OpenAPITools/openapi-generator#2360.
Should we update the official spec to move all enums to dedicated files under components/schemas/?
Something to keep in mind here is that enum can cause problems on response models. For example, if a new value is introduced by the API, all existing SDKs will throw a validation error when they encounter that new value, effectively breaking any integrations based on generated SDKs
The text was updated successfully, but these errors were encountered:
This enables the [`RESOLVE_INLINE_ENUMS` option for
`[email protected]`](https://openapi-generator.tech/docs/customization#inline-schema-naming)
to tell the generator to create dedicated models for inline enums
instead of treating the inline enums as plain strings. Among other
things, generating inline enums helps the SDK properly validate API
responses against `oneOf` schemas in which each component schema has
different enum values for the same property name.
In addition to the `RESOLVE_INLINE_ENUMS` option, this also enables the
`enumClassPrefix` setting. Since the constants used in each enum are
defined in the same scope, we have to turn this setting on in order to
avoid conflicts between different enums that include identical values.
Fixes#124
The Metal API spec has a number of inline
enum
definitions. There's a bug in the Go generator that treats these inlineenums
as strings instead of creating a Go enum for them: OpenAPITools/openapi-generator#2360.Should we update the official spec to move all
enums
to dedicated files undercomponents/schemas/
?Something to keep in mind here is that
enum
can cause problems on response models. For example, if a new value is introduced by the API, all existing SDKs will throw a validation error when they encounter that new value, effectively breaking any integrations based on generated SDKsThe text was updated successfully, but these errors were encountered: