Closed shijinrajbosch closed 1 year ago
Hi @shijinrajbosch, the issue described here is almost completely identical to #438, with the sole exception that here the JSON Schema generation is called, while in the other issue the OpenAPI specification generation is called. However, the context and the source of problem, as well as the suggested way to address it, is identical. Please refer to my comment in the other issue.
I'm closing this issue since the JSON Schema generation works as intended.
Many thanks @atextor for the clarifications, help and support.
Describe the bug Describe the bug Test case works with sds-aspect-model-starter 2.1.3 & esmf-aspect-model-starter 2.2.3 and failing with - esmf-aspect-model-starter 2.3.1 & 2.3.2
Test class : org.eclipse.tractusx.semantics.hub.ModelsApiTest Test method : testGenerateJsonSchemaExpectSuccess()
Semantic-hub Github : https://github.com/bci-oss/sldt-semantic-hub.git (for esmf-aspect-model-starter 2.3.1) Branch - bug/SAMM_BAMM_support
Semantic-hub Github : https://github.com/bci-oss/sldt-semantic-hub.git (for esmf-aspect-model-starter 2.3.2) Branch - SAMM_BAMM_Support-ESMF_SDK_2.3.2
Where Test class : org.eclipse.tractusx.semantics.hub.ModelsApiTest Test method : testGenerateJsonSchemaExpectSuccess()
java.lang.AssertionError: components.schemas Expected: urn_samm_org.eclipse.esmf.samm_characteristic_2.0.0_Boolean but none found ; properties.moving.$ref Expected: #/components/schemas/urn_samm_org.eclipse.esmf.samm_characteristic_2.0.0_Boolean got: #/components/schemas/urn_samm_org.eclipse.esmf.samm_characteristic_2.1.0_Boolean
Additional context
String urnPrefix = "urn:samm:org.eclipse.tractusx.model.status.transition:2.0.0#";
Model model = find model from fuseki data base using the org.eclipse.esmf.aspectmodel.urn.AspectModelUrn . The model created in apache fuseki database is here
String modelDefinition = model.toString()
Please find the actual.json and Expected.json for your reference.
actual.json expected.json