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

Optimize Regex object usage for parameter validation #934

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

AllegraCodes
Copy link

Use a new object to store requested Regex objects for parameter validation. When a parameter needs regex validation, retrieve the appropriate Regex from this object instead of creating a new one.

Resolves #864

@AllegraCodes
Copy link
Author

not sure how to test this but the generated code looks ok to me

@AllegraCodes
Copy link
Author

sorry, not sure how to handle the modified generator. should i run openapi-generator:updateApiSpecStable and push that, or run generateSources and push that?

@nielsvanvelzen
Copy link
Member

sorry, not sure how to handle the modified generator. should i run openapi-generator:updateApiSpecStable and push that, or run generateSources and push that?

Run the :openapi-generator:generateSources task to update all generated sources.

package org.jellyfin.sdk.model


public object RegexValidator {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't want to introduce additional code generation that relies on existing classes. This is the main reason I didn't add the centralized regex validation myself yet.

@jellyfin-bot jellyfin-bot added the merge conflict Conflicts prevent merging label Jun 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge conflict Conflicts prevent merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Optimize RegEx validation pattern usage
3 participants