Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

specs: model not generated for requestBody with array type #891

Closed
shortcuts opened this issue Aug 3, 2022 · 1 comment · Fixed by #896
Closed

specs: model not generated for requestBody with array type #891

shortcuts opened this issue Aug 3, 2022 · 1 comment · Fixed by #896
Labels
Specs Issue related to the REST API specs

Comments

@shortcuts
Copy link
Member

Description

requestBody of type array does not:

  • preserve the name of their schema, ref, title or anything.
  • generate a type for the array model

Seems to be related to some of the opened issues on that subject, which leads to having properties named after the object name:

Related issues:

Expected behavior

  • (optional) The array version of the model should be generated
  • The expected parameter should have the name of the model to keep the usage consistent
    • saveRules allow multiple rules to be saved, you expect the name of the list to be plural.

Workaround

Investigate the generateAliasAsModel option as logged from the generator:

Model rules not generated since it's an alias to array (without property) and `generateAliasAsModel` is set to false (default)

Environment

  • Client: Search
  • Language: All
  • Client version: All
@shortcuts shortcuts added the Specs Issue related to the REST API specs label Aug 3, 2022
@shortcuts
Copy link
Member Author

cc @millotp as we discussed this before

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Specs Issue related to the REST API specs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant