Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

JSON Schema Viewer in Angular

License

NotificationsYou must be signed in to change notification settings

jy95/ngx-json-schema-viewer

Repository files navigation

JSON Schema viewer in Angular



License: AGPL v3 [npm latest package] [npm downloads]Codacy BadgePRs WelcomeprettierBuy Me A Coffee


Overview

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/

Installation

npm install ngx-json-schema-viewer

Usage

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};}

Inputs

ParameterTypeMandatoryDescription
schemaJSON SchemaYesThe JSON schema object to be displayed
resolverOptionsIResolveOptsNoAdditional 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.

Providers

JSV_OPTIONS

Field NameDescriptionTypeDefault Value
showExamplesControls whether to display "examples."booleanfalse
qualifierMessagesOrderDefines 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"]

Credits

Special thanks todocusaurus-json-schema-plugin, which this project ported it to the Angular world.

Contributors

Releases

No releases published

Packages

No packages published

Contributors2

  •  
  •  

Languages


[8]ページ先頭

©2009-2025 Movatter.jp