👉 ZenWave360 Helps You Create Software Easy to Understand
Generate OpenAPI definition from ZDL Models:
- Component Schemas for entities, plain and paginated lists
- CRUD operations for entities
jbang zw -p io.zenwave360.sdk.plugins.ZDLToOpenAPIPlugin \
specFile=src/main/resources/model/orders-model.zdl \
idType=integer \
idTypeFormat=int64 \
targetFile=src/main/resources/model/openapi.yml
Option | Description | Type | Default | Values |
---|---|---|---|---|
specFile |
Spec file to parse | String | ||
targetFolder |
Target folder to generate code to. If left empty, it will print to stdout. | File | ||
targetFile |
Target file | String | openapi.yml | |
title |
API Title | String | ||
idType |
JsonSchema type for id fields and parameters. | String | string | |
idTypeFormat |
JsonSchema type format for id fields and parameters. | String | ||
zdlBusinessEntityProperty |
Extension property referencing original zdl entity in components schemas (default: x-business-entity) | String | x-business-entity | |
zdlBusinessEntityPaginatedProperty |
Extension property referencing original zdl entity in components schemas for paginated lists | String | x-business-entity-paginated | |
paginatedDtoItemsJsonPath |
JSONPath list to search for response DTO schemas for list or paginated results. Examples: '$.items' for lists or '$.properties..items' for paginated results. | List | [$.items, $.properties.content.items] | |
continueOnZdlError |
Continue even when ZDL contains fatal errors | boolean | true |
jbang zw -p io.zenwave360.sdk.plugins.ZDLToOpenAPIPlugin --help
Generates JDL model from OpenAPI schemas
Option | Description | Type | Default | Values |
---|---|---|---|---|
specFile |
API Specification File | URI | ||
targetFolder |
Target folder to generate code to. If left empty, it will print to stdout. | File | ||
entities |
Entities to generate code for | List | [] | |
targetFile |
Target file | String | entities.jdl | |
useRelationships |
Whether to use JDL relationships or plain field | boolean | true | |
basePackage |
Java Models package name | String | io.example.domain.model |
jbang zw -p io.zenwave360.sdk.plugins.OpenAPIToJDLPlugin --help