You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These use an example expansion directive of "..." (btw this is a special directive value speakeasy uses to direct our generator how to generate examples, we would be open to discussing alternative directives that both speakeasy and wiretap could use if you didn't want to support this one) which tells our generator to expand the example with an example value generated from the child schema, ie the additionalProperties schema or items schema.
In the examples above we are saying we want the map example to contain two keys (key and key2) where the values are using the example generated from the simpleObject component. This provides a shorthand to avoid having to define the whole json object in the example at this level and instead take advantage of the fact the examples have already been defined in the component.
The array version is just saying I want two values of the example defined in the simpleObject component.
Would love if the mocking from wiretap also supported this (or something similar that we can converge on) as it does reduce the burden for the example implementor.
The text was updated successfully, but these errors were encountered:
consider the below schemas:
These use an example expansion directive of
"..."
(btw this is a special directive value speakeasy uses to direct our generator how to generate examples, we would be open to discussing alternative directives that both speakeasy and wiretap could use if you didn't want to support this one) which tells our generator to expand the example with an example value generated from the child schema, ie theadditionalProperties
schema oritems
schema.In the examples above we are saying we want the
map
example to contain two keys (key
andkey2
) where the values are using the example generated from thesimpleObject
component. This provides a shorthand to avoid having to define the whole json object in the example at this level and instead take advantage of the fact the examples have already been defined in the component.The array version is just saying I want
two
values of the example defined in thesimpleObject
component.Would love if the mocking from wiretap also supported this (or something similar that we can converge on) as it does reduce the burden for the example implementor.
The text was updated successfully, but these errors were encountered: