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

Mocks (for MSW) are wrongly generated with deeply nested objects #1692

Open
Hypenate opened this issue Nov 7, 2024 · 1 comment
Open

Mocks (for MSW) are wrongly generated with deeply nested objects #1692

Hypenate opened this issue Nov 7, 2024 · 1 comment
Labels
bug Something isn't working msw MSW related issues

Comments

@Hypenate
Copy link
Contributor

Hypenate commented Nov 7, 2024

What are the steps to reproduce this issue?

YAML Path

  '/api/tenants/{tenantId}':
    get:
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenantComposite'

YAML Schema

    TenantComposite:
      allOf:
        - $ref: '#/components/schemas/Tenant'

    TenantComposite:
      allOf:
        - $ref: '#/components/schemas/Tenant'
        
    Tenant:
      allOf:
        - $ref: '#/components/schemas/TenantLight'

What happens?

In the .msw file, it generates the following:
export const getGetApiTenantsTenantIdResponseMock = (): TenantCompositeDto => ({...enabled: faker.datatype.boolean(),

What were you expecting to happen?

In the .msw file, it generated the following:
export const getGetApiTenantsTenantIdResponseMock = (): TenantCompositeDto => ({enabled: faker.datatype.boolean(),

What versions are you using?

7.2.0

@Hypenate
Copy link
Contributor Author

Hypenate commented Nov 7, 2024

Maybe related to #1635

@melloware melloware added bug Something isn't working msw MSW related issues labels Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working msw MSW related issues
Projects
None yet
Development

No branches or pull requests

2 participants