Skip to content

Conversation

@daleef-rahman
Copy link
Contributor

#1121 reports that use of AnyOf inline generates invalid go code for client (struct type names starting with a number).
This PR fixes 2 issues:

  1. When status code is the first element of path, PathToTypeName function will generate type name starting with a number
  2. When a property have UnionElements and we use PathToTypeName to generate a reference type, we are not creating the corresponding struct for it

Closes #1121

@deepmap-marcinr
Copy link
Contributor

I'm happy to merge this.

Please rebase, then run go generate ./... from the top level, and fix that linter error.

@daleef-rahman
Copy link
Contributor Author

I'm happy to merge this.

Please rebase, then run go generate ./... from the top level, and fix that linter error.

Thank you for your message. Will get this done today.

@daleef-rahman daleef-rahman deleted the defect/anyof-1121 branch August 4, 2023 19:08
@daleef-rahman daleef-rahman restored the defect/anyof-1121 branch August 4, 2023 19:09
@daleef-rahman daleef-rahman deleted the defect/anyof-1121 branch August 4, 2023 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

use of AnyOf generates struct type names starting with a number

2 participants