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

class-name parameter regex validator not catching hyphen #6187

Open
Loag opened this issue Feb 21, 2025 · 2 comments · May be fixed by #6188
Open

class-name parameter regex validator not catching hyphen #6187

Loag opened this issue Feb 21, 2025 · 2 comments · May be fixed by #6188
Labels
generator Issues or improvements relater to generation capabilities. help wanted Issue caused by core project dependency modules or library type:bug A broken experience WIP
Milestone

Comments

@Loag
Copy link

Loag commented Feb 21, 2025

What are you generating using Kiota, clients or plugins?

API Client/SDK

In what context or format are you using Kiota?

Linux executable

Client library/SDK language

TypeScript

Describe the bug

when running:

kiota generate -l typescript -d some-openapi-spec.json -c classname-ts -o ./client

an error does not occur.

Expected behavior

The string regex validator should catch this as an invalid class name and return the error that this is not valid.

How to reproduce

kiota generate -l typescript -d some-openapi-spec.json -c classname-ts -o ./client

Open API description file

No response

Kiota Version

1.23.0+e148ba500009faf72a57883f905e1ca922add0e2

Latest Kiota version known to work for scenario above?(Not required)

No response

Known Workarounds

No response

Configuration

No response

Debug output

Click to expand log ```
</details>


### Other information

_No response_
@Loag Loag added status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience labels Feb 21, 2025
@github-project-automation github-project-automation bot moved this to Needs Triage 🔍 in Kiota Feb 21, 2025
@msgraph-bot msgraph-bot bot added the TypeScript Pull requests that update Javascript code label Feb 21, 2025
@baywet
Copy link
Member

baywet commented Feb 21, 2025

Hi @Loag
Thank you for using kiota and for reaching out.

The validation is performed here.

private static partial Regex classNameRegex();

Is this something you'd like to submit a pull request for provided some guidance?

@baywet baywet added help wanted Issue caused by core project dependency modules or library generator Issues or improvements relater to generation capabilities. and removed TypeScript Pull requests that update Javascript code status:waiting-for-triage An issue that is yet to be reviewed or assigned labels Feb 21, 2025
@baywet baywet moved this from Needs Triage 🔍 to New📃 in Kiota Feb 21, 2025
@Loag
Copy link
Author

Loag commented Feb 21, 2025

Yes I can

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. help wanted Issue caused by core project dependency modules or library type:bug A broken experience WIP
Projects
Status: New📃
2 participants