Code Monkey home page Code Monkey logo

Comments (5)

ralfhandl avatar ralfhandl commented on August 12, 2024

Hi Gaurav (@golchha007),

So far I was not aware of use cases needing more than one target path segments.

Could you please explain what you want to achieve, and provide an example (full EDMX or snippets) for your use case?

Thanks in advance

from odata-openapi.

golchha007 avatar golchha007 commented on August 12, 2024

Hi Ralf,

Sharing a pdf file with Annotation whose target path is more than 2 level.
Annotation.pdf

The target path is "cds_xdmoxui_travel_approver_m.__Format/FitToPage/ErrorRecoveryBehavior".
If it would have been 2 level upto FitToPage it would be handled by the existing code base but for this scenario where we have 3 level target path segment, we end up getting warning message as "More than two annotation target path segments"

Best Regards,
Gaurav

from odata-openapi.

ralfhandl avatar ralfhandl commented on August 12, 2024

Hi Gaurav,

Neither ValueListReferences nor ValueListWithFixedValues is used in OpenAPI generation, so they would be silently ignored anyway, see the list of Supported Annotations.

Now they are ignored "loudly" and OpenAPI generation should succeed.

Does this answer your question?

Thanks in advance
Ralf

from odata-openapi.

golchha007 avatar golchha007 commented on August 12, 2024

Hi Ralf,

Thanks for clearing the doubt.
But this actually lead me to another doubt. Will annotation which is supported and has more than two annotation target path, will that be ignored with warning message "More than two annotation target path segments"
For example Immutable is a supported Annotation but has more than two annotation target path. What will happen in such case ?

Best Regards,
Gaurav

from odata-openapi.

ralfhandl avatar ralfhandl commented on August 12, 2024

Hi Gaurav,

for Immutable you are effectively limited to one path segment only, target must use the pattern qualified.entitytype/property.

OData allows you to use two or more path segments to express for example "street within the shipping address of a sales quote is immutable, and in all other uses of address it is mutable", but the OpenAPI generator can't express this as it will generate a single schema for a complex type, and not different schemas for different uses of the complex type.

If you have more questions, please don't hesitate to ask.

Thanks in advance

from odata-openapi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.