You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

ngx-json-schema-viewer

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngx-json-schema-viewer

ngx-json-schema-viewer

6.0.0
latest
Source
npmnpm
Version published
Weekly downloads
15
50%
Maintainers
1
Weekly downloads
 
Created
Source

ngx-json-schema-viewer

JSON Schema viewer in Angular



License: AGPL v3 [npm latest package] [npm downloads] Codacy Badge PRs Welcome prettier Buy 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>
  `
})
export class AppComponent {
  // Your JSON Schema here
  jsonSchema = {
    "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 type IResolveOpts. If not provided, the component will use default options.

Note: For more information on IResolveOpts, refer to the GitHub 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 to docusaurus-json-schema-plugin, which this project ported it to the Angular world.

Contributors

Keywords

angular

FAQs

Package last updated on 23 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts