-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: basic schema viewer able to be deployed #254
Conversation
// const _applicationTypeProperty = | ||
// '$data.application.type.description' || '$applicationType'; |
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.
Eslint complained that this was an unused variable so have commented out for now.
@@ -309,7 +309,7 @@ interface GLAGainedUnit extends GLALostUnit { | |||
/** | |||
* TypeMap of PrimaryApplicationTypes to their specific Proposal models | |||
*/ | |||
type ProposalVariants = {}; | |||
type ProposalVariants = object; |
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.
Another eslint complaint:
Don't use `{}` as a type. `{}` actually means "any non-nullish value".
- If you want a type meaning "any object", you probably want `object` instead.
- If you want a type meaning "any value", you probably want `unknown` instead.
- If you want a type meaning "empty object", you probably want `Record<string, never>` instead.
- If you really want a type meaning "any non-nullish value", you probably want `NonNullable<unknown>` instead.
@@ -2729,6 +2729,7 @@ export type PropertyType = | |||
| CommercialUtilityWaterTreatmentWater | |||
| CommercialUtilityWaterWaste | |||
| DualUse | |||
// eslint-disable-next-line @typescript-eslint/ban-types |
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.
ESLint was complaining about (I think) the keyword 'object' even though Object
is defined as its own custom type further up the file.
<MosaicProvider> | ||
<Box mx="auto" py={20} px={8} style={{maxWidth: 800}}> | ||
<JsonSchemaViewer | ||
// name="Digital planning data schemas" |
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.
Attributes commented out because causing type errors
In this PR:
/docs
folder containing a create-react-app project featuring@stoplight/json-schema-viewer
/schemas
into its own package so it can be imported into the/docs
project.