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

feat: support patternParameters and typed additionalParameters #1387

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

paragon
Copy link
Contributor

@paragon paragon commented Feb 1, 2025

The goal of this PR is to support the ability to specify either:

additionalProperties:
    type: string

...or...

patternProperties:
    "regex_expr":
        type: string

I've created a test case here that utilizes both additionalProperties and patternProperties and succeeds in creating the associated codegen. Most notably, the generated schema file (internal/integration/test_additionalpropertiespatternproperties/oas_schemas_gen.go) seems to be look good which (at least, to me) indicates things are behaving as expected.

I'm hoping this is the correct approach here. If not, I'd be happy to start a discussion on best approaches to facilitate supporting additionalProperties and patternProperties.

As an aside: it seems like based on prior discussions that there has been hesitation in supporting additionalProperties: true. As such, this PR does not aim to support it.

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.

1 participant