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

[BUG][JAVA][Typescript] Nested additionalProperties not working #5532

Open
5 tasks done
gbertoncelli opened this issue Mar 5, 2020 · 0 comments
Open
5 tasks done

Comments

@gbertoncelli
Copy link

gbertoncelli commented Mar 5, 2020

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • What's the version of OpenAPI Generator used?
  • Have you search for related issues/PRs?
  • What's the actual output vs expected output?
Description

When trying to describe a schema with nested additionalProperties the generator generate a type where the nested element is an object and not the nested additionalProperties type.

openapi-generator version

stable 4.2.3

OpenAPI declaration file content or url

https://gist.github.com/HighSoftWare96/e55d9bbeac3621e241eb8ba4b11fbcd3
Actual output - This example generates a type like this:

servicesStatus?: { [key: string]: { [key: string]: object; }; };

but the expected output should be:

servicesStatus?: { [key: string]: { [key: string]: { available: boolean }; }; };
Command line used for generation

openapi-generator generate -i oas3.json -o sdk -g typescript-angular

Steps to reproduce
  • Create file oas3.json with the specified gist example
  • Generate the SDK with the command above
nokome added a commit to stencila/hub that referenced this issue Oct 14, 2020
Due to a bug in openapi-generator (perhaps related to OpenAPITools/openapi-generator#5532) the Typescript API is not ideal, but still an improvement.

Ping @alex-ketch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant