Coder Social home page Coder Social logo

Comments (6)

darrelmiller avatar darrelmiller commented on June 11, 2024 2

I do not believe this is a helpful example. I do not believe we have ever talked about how a JSON model should be serialized in text/plain payloads. We should make it a more useful example.

from openapi-specification.

handrews avatar handrews commented on June 11, 2024

@OAI/tsc review request: see above

from openapi-specification.

karenetheridge avatar karenetheridge commented on June 11, 2024

I expect some git spelunking (in an old swagger repo, perhaps)? might be needed to derive the original intent here. I agree it makes no sense at all - text/plain's serializer/deserializer is the identity function (and indeed my implementation has this hardcoded for 'text/*')!

from openapi-specification.

mikekistler avatar mikekistler commented on June 11, 2024

I agree that this is not a helpful example and we should make it more useful.

But I think there is a larger question here which is: how to interpret -- or whether to ignore -- schema for various media types. Does it make any sense for text/plain content to have any schema other than type: string? Likewise, for image/<anything> does it make any sense to have any schema other than type: string, format: binary?

In other words, I think that certain content types imply the schema -- maybe even impose a schema. I realize this is a much larger topic than just fixing an example, but shouldn't we address this somehow?

from openapi-specification.

handrews avatar handrews commented on June 11, 2024

@mikekistler I have had similar thoughts that there's a general topic here. I wasn't going to bring it up yet, but since you did (and I'm glad to hear someone else have this sort of thought), I have started a discussion on a registry for data modeling:

Let's have the larger discussion there (including the idea of certain types implying or imposing a schema, which is an interesting frame that had not occurred to me) and focus on just this example (which it sounds like there is consensus to remove) here.

from openapi-specification.

handrews avatar handrews commented on June 11, 2024

I think the assessment is clear enough for me to remove the review label – I'll address this with several other media type encoding issues I'm working on.

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.