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

openapi3: introduce StringMap type to enable unmarshalling of maps with Origin #1018

Merged
merged 3 commits into from
Oct 16, 2024

Conversation

reuvenharrison
Copy link
Contributor

This PR replaces two fields in openapi3 from map[string]string by a new type StringMap:

  • Discriminator.Mapping
  • OAuthFlow.Scopes

This new StringMaptype will enable unmarshalling of maps with origin in the subsequent PR: #1007.

@fenollp fenollp changed the title Introduce type StringMap to enable unmarshalling of maps with origin openapi3: introduce StringMap type to enable unmarshalling of maps with Origin Oct 14, 2024
@fenollp
Copy link
Collaborator

fenollp commented Oct 14, 2024

Please rebase on top of #1019

)

Signed-off-by: Pierre Fenoll <pierrefenoll@gmail.com>
@fenollp fenollp merged commit 56505dc into getkin:master Oct 16, 2024
5 checks passed
fenollp added a commit that referenced this pull request Oct 21, 2024
* add origin - step 1

* delete origin from content

* point to Origin

* make include origin configurable

* generic unmarshalStringMap

* add origin to more components

* revert comments

* use const originKey

* comment to Scopes

* test more specs

* Fix Discriminator

* update docs

* test on a decent set of dedicated specs

* remove trainling spaces

* add comments

* remove trailing whitespace

* update docs

* dedicated tests

* update docs

* remove whitespace

* rm empty line

* rm last newline

* add tests

* rm unused test files

* update deps

* fix paths test

* test components/security

* fix LF

* include origin in unmarshal maps

* move component unmarshallers to respective files

* fix test (json-schema 301)

* Add github.com/pb33f/libopenapi (#1004)

* Add github.com/pb33f/libopenapi

it looks like a reasonable alternative

* Update README.md

---------

Co-authored-by: Pierre Fenoll <pierrefenoll@gmail.com>

* Introduce an option to override the regex implementation (#1006)

* make form required field order deterministic (#1008)

* openapi2: fix un/marshalling discriminator field (#1011)

* fix: issue unmarshalling when discriminator field is set in openapi2.0

* revert original approach

* update with different approach

* Revert "update with different approach"

This reverts commit 2db2b39.

* v2 schema with discriminator field set as string

* update ref link and comment

* run docs.sh

* README: add Fuego to dependents (#1017)

* openapi3: skip a test in CI to avoid 403s from some remote server (#1019)

Signed-off-by: Pierre Fenoll <pierrefenoll@gmail.com>

* revert fix test (json-schema 301)

* openapi3: introduce StringMap type to enable unmarshalling of maps with Origin (#1018)

* add origin to more components

* Fix Discriminator

* update docs

* update doccs

* merge with stringmap

* remove unused Scopes

---------

Signed-off-by: Pierre Fenoll <pierrefenoll@gmail.com>
Co-authored-by: Jille Timmermans <jille@quis.cx>
Co-authored-by: Pierre Fenoll <pierrefenoll@gmail.com>
Co-authored-by: Alexander Bakker <ab@alexbakker.me>
Co-authored-by: Justin Sherrill <jlsherrill@gmail.com>
Co-authored-by: Jay Shah <jay.shah@konghq.com>
Co-authored-by: Ewen Quimerc'h <46993939+EwenQuim@users.noreply.github.com>
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