Code Monkey home page Code Monkey logo

Comments (4)

ralfhandl avatar ralfhandl commented on August 12, 2024

Hi Micah,

Thanks for the feedback, answers see below.

May I ask in which context you are using this tool?

Thanks in advance
Ralf

Swagger/OpenAPI 2.0

The Swagger/OpenAPI 2.0 specification allows arrays of string values for type in the Schema Object; the cited restriction to a single string value is only for headers and URL parameters.

The metadata url you mention is the origin of example odata-rw-v3.xml. Its OpenAPI 2.0 transformation output odata-rw-v3.openapi.json works fine in Swagger UI 2.x and Swagger Editor 2.10.5.

The online instance of Swagger Editor at http://editor.swagger.io is based on the brand new version 3.x of the combined Swagger UI/Editor, which does not yet cover all features of Swagger 2.0.

The online instance of Swagger UI (also based on the brand new version 3.x) is a little further ahead and works fine with the example, showing a green validator badge: http://petstore.swagger.io/?url=https://raw.githubusercontent.com/oasis-tcs/odata-openapi/master/examples/odata-rw-v3.openapi.json

OpenAPI 3.0.0

The XSL transformation produces OpenAPI 3.0.0 output when setting the script parameter openapi-version to 3.0.0, e.g. odata-rw-v3.openapi3.json. It produces the new nullable keyword for nullable properties.

This works fine with the online instance of Swagger UI; http://petstore.swagger.io/?url=https://raw.githubusercontent.com/oasis-tcs/odata-openapi/master/examples/odata-rw-v3.openapi3.json

It works less well with the online instance of Swagger Editor, which has some problems resolving external references during validation: http://editor.swagger.io/?url=https://raw.githubusercontent.com/oasis-tcs/odata-openapi/master/examples/odata-rw-v3.openapi3.json

from odata-openapi.

Tiberriver256 avatar Tiberriver256 commented on August 12, 2024

Hi Ralfhandl,

Thank you for the response and explanation. I am looking for something to use in a Node.js API gateway project that would dynamically display a Swagger UI for Odata endpoints. We are currently using this project https://github.com/akorchev/odata2openapi but it has fallen behind a bit and definitely not as crisp as the json generated from this project.

from odata-openapi.

ralfhandl avatar ralfhandl commented on August 12, 2024

Hi Micah,

Cool! Which XSLT processor are you planning to use?

Thanks in advance
Ralf

from odata-openapi.

Tiberriver256 avatar Tiberriver256 commented on August 12, 2024

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.