ZDL To OpenAPI Generator
👉 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
Options
Option | Description | Type | Default | Values |
---|---|---|---|---|
zdlFile | ZDL file to parse | String | Â | Â |
zdlFiles | ZDL files to parse | List | [] | Â |
title | API Title | String | Â | Â |
targetFolder | Target folder to generate code to. If left empty, it will print to stdout. | File | Â | Â |
targetFile | Target file | String | openapi.yml | Â |
idType | JsonSchema type for id fields and parameters. | String | string | Â |
idTypeFormat | JsonSchema type format for id fields and parameters. | String | Â | Â |
dtoPatchSuffix | DTO Suffix used for schemas in PATCH operations | String | Patch | Â |
operationIdsToInclude | Operation IDs to include. If empty, all operations will be included. (Supports Ant-style wildcards) | List | Â | Â |
operationIdsToExclude | Operation IDs to exclude. If not empty it will be applied to the processed operationIds to include. (Supports Ant-style wildcards) | List | Â | Â |
continueOnZdlError | Continue even when ZDL contains fatal errors | boolean | true | Â |
Getting Help
jbang zw -p io.zenwave360.sdk.plugins.ZDLToOpenAPIPlugin --help
OpenAPI To JDL
Generates JDL model from OpenAPI schemas
Options
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 | Â |
Getting Help
jbang zw -p io.zenwave360.sdk.plugins.OpenAPIToJDLPlugin --help