Giter Site home page Giter Site logo

OpenAPI v3 keywords about openapi-gui HOT 5 CLOSED

lexxito avatar lexxito commented on August 21, 2024
OpenAPI v3 keywords

from openapi-gui.

Comments (5)

MikeRalphson avatar MikeRalphson commented on August 21, 2024

Could you elaborate on what exactly doesn't work?

from openapi-gui.

lexxito avatar lexxito commented on August 21, 2024

I might be mistaken but It would make much sense for me if after uploading yaml spec file which has keywords it will be displayed as the merged object. not the list of 'allof'

from openapi-gui.

MikeRalphson avatar MikeRalphson commented on August 21, 2024

I don't think so. JSON schema allOf means the instance must be valid against all of these separate schemas. It does not mean merge them.

from openapi-gui.

lexxito avatar lexxito commented on August 21, 2024

according to this page : 'allOf' takes an array of object definitions that are used for independent validation but together compose a single object.
The thing you have described is more about 'anyof'

from openapi-gui.

MikeRalphson avatar MikeRalphson commented on August 21, 2024

From the page you linked to:

  • oneOf – validates the value against exactly one of the subschemas
  • allOf – validates the value against all the subschemas
  • anyOf – validates the value against any (one or more) of the subschemas

By "compose a single object" it means that the object instance being validated is a single object, not that the schemas listed in the allOf are merged into one object.

See also https://tools.ietf.org/html/draft-wright-json-schema-validation-00#section-5.22

OpenAPI-GUI is designed to edit your schemas as you have written them. If you want to merge them, you should do so in your OAS document. There would be no way of untangling a merged allOf schema to write it back to the exported OAS document.

from openapi-gui.

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.