Skip to content

feat(parameter): adds additional openapi mappings - #478

Merged
emicklei merged 1 commit into
emicklei:v3from
erraggy:parameter-additions
Sep 23, 2021
Merged

emicklei merged 1 commit into
emicklei:v3from
erraggy:parameter-additions

Conversation

@erraggy

@erraggy erraggy commented Sep 23, 2021 •

Copy link
Copy Markdown
Contributor

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.

2 participants