0.0.15 • Published 5 months ago

nz-json-schema-form v0.0.15

Weekly downloads
-
License
MIT
Repository
-
Last release
5 months ago

nz-json-schema-form

NG-ZORRO-antd form generation based on JSON-Schema.

Peer Dependencies

  • "@angular/common": "^17.0.0",
  • "@angular/core": "^17.0.0",
  • "ng-zorro-antd": "^17.0.0"

Usage

@Component({
  selector: 'app-form',
  template: '<nz-schema [nzSchema]="schema"></nz-schema>'
})
export class FormComponent implements OnInit {
  schema: NzSchema = {
    $schema: 'https://json-schema.org/draft/2020-12/schema',
    $id: 'https://example.com/product.schema.json',
    title: 'Product',
    description: "A product from Acme's catalog",
    type: 'object',
    properties: {
      productId: {
        description: 'The unique identifier for a product',
        type: 'number',
        title: 'Product Name'
      },
      productName: {
        description: 'Name of the product',
        type: 'string',
        title: 'Product Name'
      },
      tags: {
        description: 'Tags for the product',
        type: 'array',
        items: {
          type: 'string'
        },
        minItems: 1,
        uniqueItems: true,
        title: 'Tags'
      }
    },
    required: ['productId', 'productName']
  };
}
0.0.15

5 months ago

0.0.13

7 months ago

0.0.14

6 months ago

0.0.13-beta

7 months ago

0.0.10

1 year ago

0.0.11

1 year ago

0.0.12

1 year ago

0.0.9

1 year ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago