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
"uiNodeInputAttributes": {
"description": "InputAttributes represents the attributes of an input node",
"properties": {
// ...
"autocomplete": {
"description": "The autocomplete attribute for the input.",
"enum": [
"email",
"tel",
"url",
"current-password",
"new-password",
"one-time-code"
],
"type": "string"
},
"type": {
"description": "The input's element type.",
"type": "string",
"enum": [
"text",
"password",
"number",
"checkbox",
"hidden",
"email",
"tel",
"submit",
"button",
"datetime-local",
"date",
"url"
],
},
// ...
},
"required": [
// ...
"type",
// ...
],
"type": "object"
},
rust does not compile because the Type enum is missing from the UiNodeAttributes definition. It does exist in the UiNodeInputAttributes definition though! Interestingly, the AutoComplete enum works just fine:
error[E0412]: cannot find type `TypeEnum` in this scope
--> src/models/ui_node_attributes.rs:66:16
|
66 | _type: TypeEnum,
| ^^^^^^^^ not found in this scope
|
help: consider importing one of these items
|
13 | use crate::models::expand_tree::TypeEnum;
|
13 | use crate::models::ui_node::TypeEnum;
|
13 | use crate::models::ui_node_input_attributes::TypeEnum;
If we remove the enum from type, this will work though.
aeneasr
changed the title
[BUG] [Rust] fails to compile when enum field is required within discriminator
[BUG] [Rust] fails to compile when enum field is used within discriminator
Jul 26, 2022
aeneasr
changed the title
[BUG] [Rust] fails to compile when enum field is used within discriminator
[BUG] [Rust] fails to compile when multiple enum fields are used within discriminator
Jul 26, 2022
Bug Report Checklist
Description
When using a discriminator:
with a type that has a required enum:
rust does not compile because the
Type
enum is missing from theUiNodeAttributes
definition. It does exist in theUiNodeInputAttributes
definition though! Interestingly, the AutoComplete enum works just fine:If we remove the enum from
type
, this will work though.openapi-generator version
5.4.0 to 6.0.1
OpenAPI declaration file content or url
Not working:
https://raw.githubusercontent.com/ory/sdk/master/spec/client/v0.2.0-alpha.3.json
Working:
https://raw.githubusercontent.com/ory/sdk/master/spec/client/v0.2.0-alpha.4.json
Generation Details
The text was updated successfully, but these errors were encountered: