Coder Social home page Coder Social logo

Comments (8)

karenetheridge avatar karenetheridge commented on May 29, 2024 1

I've added comments/suggestions to all 3 PRs following the discussion at the meeting today.

from openapi-specification.

karenetheridge avatar karenetheridge commented on May 29, 2024

Please refer to the 3.1.1 specification in the v3.1.1-dev branch, as there have already been some corrections to this area of the specification.

It does appear that the table is incorrect for simple, at least -- primitive and object types are supported there, and it probably makes sense to allow primitives for spaceDelimited and pipeDelimited.

from openapi-specification.

mikekistler avatar mikekistler commented on May 29, 2024

Why does it make sense to allow primitives for spaceDelimited and pipeDelimited? The description for these two styles is specific to arrays.

spaceDelimited: Space separated array values.
pipeDelimited: Pipe separated array values.

from openapi-specification.

karenetheridge avatar karenetheridge commented on May 29, 2024

I'm coming at it from the perspective of a request/response validation author, where we're taking data in a request or response and deserializing it into a data structure. From this angle, allowing more types means fewer places where the validation would error out because of the wrong type being specified in the schema, but indeed it doesn't add any value to allow it (the application might as well accept an array with a single value).

from openapi-specification.

karenetheridge avatar karenetheridge commented on May 29, 2024

Update: we discussed this PR at the TSC meeting today (#3672) and decided:

  • the changes for simple are sensible - all of primitives, arrays and objects are possible and make sense, so the spec should reflect that
  • regarding spaceDelimited and pipeDelimited, a primitive type is not useful here (when writing an api spec, if you're expecting a string why would you specify style: spaceDelimited? just use simple form).

Therefore -- @charjr: could you possibly revert the changes to spaceDelimited and pipeDelimited in your PRs? I think then we should be able to review and merge them quickly (e.g. before or by the next TSC meeting). thanks!

from openapi-specification.

charjr avatar charjr commented on May 29, 2024

@karenetheridge I've updated each PR to remove the primitive type from spaceDelimited and pipeDelimited.

Hopefully it's ready to go, if not let me know.

from openapi-specification.

karenetheridge avatar karenetheridge commented on May 29, 2024

looks great, thank you!

from openapi-specification.

charjr avatar charjr commented on May 29, 2024

@karenetheridge updated, let me know if it needs any further changes.

from openapi-specification.

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.