Skip to content

Commit

Permalink
fix(msw): Incorrect Import Generated for Enum in Mock Files (#1639)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlmarAubel authored Sep 23, 2024
1 parent a45b20f commit b37b2b3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
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

0 comments on commit b37b2b3

Please sign in to comment.