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

fix(msw): Incorrect Import Generated for Enum in Mock Files #1639

Merged
merged 2 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/mock/src/faker/resolvers/value.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export const resolveMockValue = ({

const newSchema = {
...schemaRef,
name: originalName,
name: pascal(originalName),
path: schema.path,
isRef: true,
};
Expand Down
8 changes: 8 additions & 0 deletions samples/vue-query/vue-query-basic/petstore.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@ paths:
description: Success
components:
schemas:
Domain.Status.Enum:
type: string
enum:
- new
- sold
- uknown
Pet:
type: object
required:
Expand All @@ -129,6 +135,8 @@ components:
type: string
tag:
type: string
status:
$ref: '#/components/schemas/Domain.Status.Enum'
email:
type: string
format: email
Expand Down