Skip to content

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
OptionDescriptionTypeDefaultValues
zdlFileZDL file to parseString
zdlFilesZDL files to parseList[]
titleAPI TitleString
targetFolderTarget folder to generate code to. If left empty, it will print to stdout.File
targetFileTarget fileStringopenapi.yml
idTypeJsonSchema type for id fields and parameters.Stringstring
idTypeFormatJsonSchema type format for id fields and parameters.String
dtoPatchSuffixDTO Suffix used for schemas in PATCH operationsStringPatch
operationIdsToIncludeOperation IDs to include. If empty, all operations will be included. (Supports Ant-style wildcards)List
operationIdsToExcludeOperation IDs to exclude. If not empty it will be applied to the processed operationIds to include. (Supports Ant-style wildcards)List
continueOnZdlErrorContinue even when ZDL contains fatal errorsbooleantrue
jbang zw -p io.zenwave360.sdk.plugins.ZDLToOpenAPIPlugin --help

Generates JDL model from OpenAPI schemas

OptionDescriptionTypeDefaultValues
specFileAPI Specification FileURI
targetFolderTarget folder to generate code to. If left empty, it will print to stdout.File
entitiesEntities to generate code forList[]
targetFileTarget fileStringentities.jdl
useRelationshipsWhether to use JDL relationships or plain fieldbooleantrue
basePackageJava Models package nameStringio.example.domain.model
jbang zw -p io.zenwave360.sdk.plugins.OpenAPIToJDLPlugin --help