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

code-gen: support for digits in namePart type/pattern #1800

Closed
tjonger opened this issue May 12, 2022 · 0 comments · Fixed by #1803
Closed

code-gen: support for digits in namePart type/pattern #1800

tjonger opened this issue May 12, 2022 · 0 comments · Fixed by #1803
Labels
bug Something isn't working prio 1 Defines the highest prio issues

Comments

@tjonger
Copy link
Collaborator

tjonger commented May 12, 2022

Most external API's have some version number in the endpoints paths. Since v197 of compas the namePart is sticker, which good I think. But when compas uses the extendWithOpenApi method (see below) to convert an openapi stucture to a compas one, most route paths are used as route names (in compas). This results in validation errors on openapi imported routes.

const app = new App();
app.extendWithOpenApi("group", data);

Example:
image

Source https://github.com/compasjs/compas/blob/main/gen/code-gen.js#L13

Peposed regex: ^[a-zA-Z][a-zA-Z0-9]+$
Can contain digits but can not start with one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working prio 1 Defines the highest prio issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants