generator-jhipster icon indicating copy to clipboard operation
generator-jhipster copied to clipboard

Schema references in JDL

Open clemi2408 opened this issue 3 years ago • 2 comments

Overview of the issue

Does JDL support to define entities based on json schema?

entity Customer ref http://a-server/a-path/Customer.json

Or define external specs of all kinds like:

spec RequestA {
    type jsonschema
    url http://a/source/requestA.json
}

spec RequestB {
    type xsd
    url http://a/source/requestB.xsd
}

spec WsdlApi {
    type wsdl
    url http://a/source/api.wsdl
}

spec Api1 {
    type openapi
    url http://a/source/api1.yml
}

spec Api2 {
    type openapi
    url http://a/source/api2.json
}

and map them to services.

application {
  config {
    openApiServer true
    openApiClient true
    generateModels true
  }
  serverSpecs Api1
  clientSpecs Api2
  modelSpecs RequestB
}

maybe this could also go hand in hand with library management in jdl - could imagine something like this to define

wiredlib library1 {
    groupId io.fabric8.kubeflix
    artifactId hello-world-example
    version 1.0.28
}

generatedlib library2 {
    spec Api1
    client false
    server true
}

and usage like this:

application {
  config {
    wiredLibs true
    generatedLibs true
  }
  wiredlibs library1
  generatedlibs library2
}
Motivation for or Use Case

Would like to use internet reachable api endpoints to reference schema specs in jdl

Suggest a Fix

support schema mappings in jdl process schema mappings and generate openapi-generator/jsonschema-generator pom entries.

JHipster Version(s)

7.8.1

clemi2408 avatar Jun 21 '22 11:06 clemi2408

This issue is stale because it has been open for too long without any activity. Due to the moving nature of jhipster generated application, bugs can become invalid. If this issue still applies please comment otherwise it will be closed in 7 days

github-actions[bot] avatar Dec 14 '23 00:12 github-actions[bot]

Moving nature of...

clemi2408 avatar Dec 14 '23 07:12 clemi2408