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(parameter): adds additional openapi mappings #478

Merged
merged 1 commit into from Sep 23, 2021

Conversation

erraggy
Copy link
Contributor

@erraggy erraggy commented Sep 23, 2021

Adds the following OpenAPI features to parameter:

  • AllowEmptyValue
  • Pattern
  • Minimum
  • Maximum
  • MinLength
  • MaxLength
  • MinItems
  • MaxItems
  • UniqueItems

This also adds the operation name and route ParameterDocs to the FilterChain struct to allow filters access to both the operation name as well as the parameters defined for the requested route. Having this metadata allows filters to validate if a request is honoring the defined parameters.

This has additional changes to emicklei/go-restful-openapi#74 that would need to also be merged and released after this is.

Adds the following OpenAPI features to parameter:
  - AllowEmptyValue
  - Pattern
  - Minimum
  - Maximum
  - MinLength
  - MaxLength
  - MinItems
  - MaxItems
  - UniqueItems

 This has additional changes to go-restful-openapi that I will link after submitting to that repo.
@emicklei emicklei merged commit 3a48207 into emicklei:v3 Sep 23, 2021
@erraggy erraggy deleted the parameter-additions branch September 23, 2021 17:44
SVilgelm pushed a commit to SVilgelm/go-restful that referenced this pull request Nov 24, 2021
…et function

The PR emicklei#478 brought some weird changes that breaks the filters behaviour.
We have a filter that creates another instance of Response to intercept all headers and data, then does an audit and modifies the data and only then it forwards to the original response.
But the lambda added in that PR breaks this logic, since the target function writes directly to the original response.
emicklei pushed a commit that referenced this pull request Nov 24, 2021
…et function (#482)

The PR #478 brought some weird changes that breaks the filters behaviour.
We have a filter that creates another instance of Response to intercept all headers and data, then does an audit and modifies the data and only then it forwards to the original response.
But the lambda added in that PR breaks this logic, since the target function writes directly to the original response.
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.

None yet

2 participants