-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add vendor examples extension support to Swagger converter #224
Labels
Type: enhancement
New feature or request.
Comments
ostridm
added a commit
that referenced
this issue
Feb 13, 2024
ostridm
added a commit
that referenced
this issue
Feb 13, 2024
ostridm
added a commit
that referenced
this issue
Feb 13, 2024
ostridm
added a commit
that referenced
this issue
Feb 13, 2024
ostridm
changed the title
Add
Add vendor examples extension support to Swagger converter
Feb 13, 2024
x-example
vendor extension support in Swagger converter
ostridm
added a commit
that referenced
this issue
Feb 15, 2024
ostridm
added a commit
that referenced
this issue
Feb 15, 2024
ostridm
added a commit
that referenced
this issue
Feb 16, 2024
ostridm
added a commit
that referenced
this issue
Feb 16, 2024
ostridm
added a commit
that referenced
this issue
Feb 16, 2024
ostridm
added a commit
that referenced
this issue
Feb 16, 2024
ostridm
added a commit
that referenced
this issue
Feb 16, 2024
ostridm
added a commit
that referenced
this issue
Feb 16, 2024
ostridm
added a commit
that referenced
this issue
Feb 16, 2024
ostridm
added a commit
that referenced
this issue
Feb 16, 2024
ostridm
added a commit
that referenced
this issue
Feb 16, 2024
ostridm
added a commit
that referenced
this issue
Feb 16, 2024
ostridm
added a commit
that referenced
this issue
Feb 16, 2024
ostridm
added a commit
that referenced
this issue
Feb 27, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Vendors are extending the specification in order to overcome some drawbacks utilizing same extension names with different approach, e.g.:
Possible solution
Implement limited support for vendor examples:
oas2har
function, which allow enabling vendor examples inclusion explicitly.Vendor examples representation
API connect/Smartbear:
Redocly:
Schemathesis:
Other:
Vendor example inclusion
When vendor examples inclusion is enabled, the following rules should apply:
x-example
/x-examples
if any unlessexample
existsx-example
primitive value firstx-example
/x-exmples
structured object looking for the object in hierarchy which is satisfied to schema keys matching, e.g. such object must not have any key which is not listed in schema.Expected behaviour
Pass the
my-schema.yaml
(see below) to theoas2har
as follows:my-schema.yaml
Expected result
HarEntry
takes its sample values for theheader
,path
,query
,posdData
parameters from thex-example
node.HarEntry
takes its sample values for thebody
parameter from thex-example
performing traversal of the vendor examples until schema matched.The text was updated successfully, but these errors were encountered: