- Notifications
You must be signed in to change notification settings - Fork0
JSON Schema Viewer in Angular
License
NotificationsYou must be signed in to change notification settings
jy95/ngx-json-schema-viewer
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Key Features:
- Compatible: Works with JSON Schema Draft-07 / Draft 2019-09 / Draft 2020-12
- Human-friendly Make exploration of specs a delightful experience
Storybook :https://master--65174c82cd070b9998efd7f6.chromatic.com/
npm install ngx-json-schema-viewer
import{NgxJsonSchemaViewerComponent,JSV_OPTIONS}from"ngx-json-schema-viewer";import{Component}from'@angular/core';@Component({selector:'app-root',standalone:true,imports:[NgxJsonSchemaViewerComponent],providers:[{provide:JSV_OPTIONS,useValue:{}}],template:` <div> <ngx-json-schema-viewer [schema]="jsonSchema"></ngx-json-schema-viewer> </div> `})exportclassAppComponent{// Your JSON Schema herejsonSchema={"type":"array","items":[{"type":"integer"},{"type":"string"}],"additionalItems":false};}
Parameter | Type | Mandatory | Description |
---|---|---|---|
schema | JSON Schema | Yes | The JSON schema object to be displayed |
resolverOptions | IResolveOpts | No | Additional options for schema resolution. It accepts an object of typeIResolveOpts . If not provided, the component will use default options. |
Note: For more information onIResolveOpts
, refer to theGitHub page of @stoplight/json-ref-resolver.
Field Name | Description | Type | Default Value |
---|---|---|---|
showExamples | Controls whether to display "examples." | boolean | false |
qualifierMessagesOrder | Defines the order of qualifier messages. | CheckKey[] | Default order:["nullable", "deprecated", "readOnly", "writeOnly", "enum", "stringLength", "objectProperties", "no-extra-properties", "arrayItems", "arrayContains", "no-extra-items", "number-range", "pattern", "multipleOf", "uniqueItems", "contentEncoding", "contentMediaType", "contentSchema", "default", "const", "examples"] |
Special thanks todocusaurus-json-schema-plugin, which this project ported it to the Angular world.
About
JSON Schema Viewer in Angular
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.
Contributors2
Uh oh!
There was an error while loading.Please reload this page.