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

Types sometimes get created with a first charater in upper case and sometimes not #2867

Closed
papegaaij opened this issue Jul 7, 2023 · 0 comments · Fixed by #2861
Closed
Assignees
Labels
generator Issues or improvements relater to generation capabilities. type:bug A broken experience WIP
Milestone

Comments

@papegaaij
Copy link
Contributor

This problem is especially visible in the Golang code where the comment for the constructor changes between:

// NewGroup instantiates a new group and sets the default values.
// NewGroup instantiates a new Group and sets the default values.

The actual code does not change, but the comments do. Running Kiota multiple times may even produce different results.

These changes come from two different parts of the code constructing the type name:

  • OpenApiSchemaExtensions.GetSchemaNames: results in a verbatim copy of the last part of the reference id.
  • OpenApiReferenceExtensions.GetClassName: converts the first character of the reference id to upper case.

These two routes should at least align. It seems the first is mostly like to end up in the type and also results in the cleanest documentation (the documentation will match the spec). Therefore I suggest to remove the ToFirstCharacterUpperCase() from the second: #2861

@baywet baywet added this to the Kiota v1.5 milestone Jul 7, 2023
@baywet baywet added this to Kiota Jul 7, 2023
@github-project-automation github-project-automation bot moved this to Todo in Kiota Jul 7, 2023
@baywet baywet added type:bug A broken experience generator Issues or improvements relater to generation capabilities. labels Jul 7, 2023
@baywet baywet moved this from Todo to In Progress in Kiota Jul 7, 2023
@baywet baywet added the WIP label Jul 7, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in Kiota Jul 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
generator Issues or improvements relater to generation capabilities. type:bug A broken experience WIP
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants