mocks-server / main

Node.js mock server running live, interactive mocks in place of real APIs
https://www.mocks-server.org
Apache License 2.0
288 stars 16 forks source link

openapi: Support media type responses with a single example #473

Closed davidmhewitt closed 1 year ago

davidmhewitt commented 1 year ago

Fixes #472

See the issue report for the rationale.

This creates a variant for the example key if the examples key isn't present.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (7f4d556) 100.00% compared to head (7e38bca) 100.00%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## release #473 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 84 84 Lines 2959 2961 +2 Branches 87 88 +1 ========================================= + Hits 2959 2961 +2 ``` | Flag | Coverage Δ | | |---|---|---| | admin-api-client | `100.00% <ø> (ø)` | | | cypress-commands | `100.00% <ø> (ø)` | | | main | `100.00% <ø> (ø)` | | | plugin-openapi | `100.00% <100.00%> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mocks-server#carryforward-flags-in-the-pull-request-comment) to find out more. | [Impacted Files](https://app.codecov.io/gh/mocks-server/main/pull/473?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mocks-server) | Coverage Δ | | |---|---|---| | [packages/plugin-openapi/src/openapi.ts](https://app.codecov.io/gh/mocks-server/main/pull/473?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mocks-server#diff-cGFja2FnZXMvcGx1Z2luLW9wZW5hcGkvc3JjL29wZW5hcGkudHM=) | `100.00% <100.00%> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.