-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
refactor(shared, dal, application-generic, api, web, dashboard): Remove json-schema-to-ts
dependency and use JsonSchemaDto
everywhere
#6921
Conversation
type?: JSONSchemaTypeName | JSONSchemaTypeName[] | undefined; | ||
enum?: JSONSchemaType[] | undefined; | ||
const?: JSONSchemaType | undefined; | ||
export type JSONSchemaDto = Readonly<{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes are for compatibility with json-schema-to-ts
's declaration of Json Schema 7 typings.
json-schema-to-ts
dependency and use JsonSchemaDto
everywherejson-schema-to-ts
dependency and use JsonSchemaDto
everywhere
@novu/client
@novu/framework
@novu/js
@novu/headless
@novu/nest
@novu/nextjs
@novu/node
@novu/notification-center
novu
@novu/providers
@novu/react
@novu/react-native
@novu/shared
@novu/stateless
commit: |
✅ Deploy Preview for novu-stg-vite-dashboard-poc ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@@ -1,7 +1,7 @@ | |||
import type { JSONSchema, FromSchema as JsonSchemaInfer } from 'json-schema-to-ts'; | |||
import zod from 'zod'; | |||
|
|||
export type JsonSchema = JSONSchema; | |||
export type JsonSchema = Exclude<JSONSchema, boolean>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The JSON schema used in Framework is a root-level JSON schema, which can't be a boolean
. For completeness, the boolean
value in the library package is present to allow for additionalProperties: JSONSchema | boolean
, which is a valid JSON schema polymorphism.
"@types/bluebird": "^3.5.24", | ||
"@types/jest": "29.5.2", | ||
"json-schema-to-ts": "^3.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹
…ovu into jsonschema-dto-everywhere
What changed? Why was the change needed?
json-schema-to-ts
dependency and use@novu/shared
'sJsonSchemaDto
everywhereScreenshots
Expand for optional sections
Related enterprise PR
Special notes for your reviewer