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

Add type check in cloneHook #156

Merged
merged 1 commit into from
Nov 16, 2024
Merged

Add type check in cloneHook #156

merged 1 commit into from
Nov 16, 2024

Conversation

Huliiiiii
Copy link
Contributor

Close #155.

Hooks might be strings and might be accidentally deconstructed in cloneHook. This will break schemas defined in models.

output of 1.1.4

"application/json": {
  "schema": {
    "0": "a",
    "1": "u",
    "2": "t",
    "3": "h",
    "4": ":",
    "5": ":",
    "6": "s",
    "7": "i",
    "8": "g",
    "9": "n"
  }
}

output of 1.1.3

"application/json": {
  "schema": {
    "$ref": "#/components/schemas/auth::sign"
  }
}

@Huliiiiii
Copy link
Contributor Author

@SaltyAom Could you please check it?
I'm using version 1.1.3 now, and it causes typebox to throw errors sometimes.

@marclave marclave self-requested a review November 4, 2024 21:24
@SaltyAom SaltyAom merged commit b89ab28 into elysiajs:main Nov 16, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Schemas defined in model will only output as string after version 1.1.4
2 participants