-
-
Notifications
You must be signed in to change notification settings - Fork 359
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
fix(msw): simplify combine #1815
base: master
Are you sure you want to change the base?
Conversation
I hope we had tests for all previously known cases. I also tried all specs in the linked issues, hope I didn't miss any edge case |
@AllieJonsson this is great! I will let the others review but I know this has been a pain for MSW users. |
To be honest I don’t remember all the cases neither 😅. Maybe it’s better to start with that and some tests for each cases that we know for now and build on it after? |
I'll check the operation with several OpenAPIs I have on hand. Please give me a moment. |
I checked and there were some regressions. I will report the details again 👍 |
The details of the error are below: paths:
/pets:
get:
operationId: get-pets
responses:
'200':
content:
application/json:
schema:
items:
$ref: '#/components/schemas/Pets'
type: array
description: OK
components:
schemas:
Pets:
properties:
petId:
allOf:
- $ref: '#/components/schemas/DogId'
- $ref: '#/components/schemas/CatId'
nullable: true
DogId:
nullable: true
type: string
CatId:
description: サービス申込者用コンテンツID
type: string It seems that an error occurs in the definition when referencing the schema with ref.
and occured error |
Great, Ill check it out and try to solve this! |
c20495a
to
85fa7ba
Compare
Thank you. I have confirmed that this case has been fixed 👍 /pet:
get:
operationId: get-pet
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Pet'
description: OK
tags:
- Pet
components:
schemas:
Pet:
type: object
required:
- id
- detail
properties:
id:
type: string
detail:
allOf:
- $ref: '#/components/schemas/Name'
Name:
type: string when i auto generated with the above definition, the following error will occur:
|
Status
READY
Description
Rewrite
combine.ts
a bit to solve some nested all-of, any-of and one-of issues. (hide whitespace in diff view to get a better view of what changed)Fixes #1807
Fixes #1526
Fixes #1692
Todos