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

Use Parent_Child instead of Parent[Child] for generated intermediate type #340

Merged
merged 1 commit into from
Jul 26, 2022

Conversation

banool
Copy link
Contributor

@banool banool commented Jul 25, 2022

In the OpenAPI specification, it states that these are the only valid characters for a component name:

A..Z a..z 0..9 . _ -

From https://swagger.io/docs/specification/components/.

As such, Poem doesn't generate conformant component names right now. This PR changes the generation from Parent[Child] to Parent_Child. I feel this is the best option, - and . are generally special characters in some languages and that would make the client generation less predictable.

We should bump the minor version for this one since it's a breaking change.

@sunli829
Copy link
Collaborator

Thanks! 🙂

@sunli829 sunli829 merged commit e25f3af into poem-web:master Jul 26, 2022
@banool banool deleted the intermediate_type_name branch July 26, 2022 07:31
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.

2 participants