Closed Boltzmann closed 2 years ago
https://github.com/SAP/olingo-jpa-processor-v4/issues/37#issuecomment-375079043 helps:
It seems that an attribute of either Person.class or BusinessPartner.class has an annotation EdmAnnotation, which can be used to generate simple OData annotation, but corresponding definition of the OData annotations is missing.
...
[...] download Org.OData.Core.V1.xml, store it e.g. under /src/main/resources/annotations You create an extension of JPAEdmMetadataPostProcessor and override method provideReferences using the following code:
String uri = "http://docs.oasisopen.org/odata/odata/v4.0/os/vocabularies/Org.OData.Core.V1.xml"; IntermediateReferenceAccess reference = references.addReference(uri, "annotations/Org.OData.Core.V1.xml"); reference.addInclude("Org.OData.Core.V1", "Core");
Why does
@EdmAnnotation(term = "Core.Description", constantExpression = @EdmAnnotation.ConstantExpression(type = CsdlConstantExpression.ConstantExpressionType.String, value = "Description Test"))
result in the xml output ofhttp://localhost:8080/Cases/V1.0/$metadata
only in `I would expect it to behave similar to the
qualifier
parameter@EdmAnnotation(term = "Core.Description", qualifier = "Qualifier", constantExpression = @EdmAnnotation.ConstantExpression(type = CsdlConstantExpression.ConstantExpressionType.String, value = "Description Test"))
that gives<Annotation Qualifier="Qualifier">
. At the moment "term" does not matter at all.Background: A
GET http://localhost:8080/Cases/V1.0/$metadata
of a project with Entitygives
I seek for a solution with an output off