Git Product home page Git Product logo

Comments (3)

astsiatsko avatar astsiatsko commented on May 20, 2024

PS. This schema is pretty valid in swagger.

from widdershins.

MikeRalphson avatar MikeRalphson commented on May 20, 2024

Hi @astsiatsko I believe the problem is that your API definition only has a consumes of application/x-www-form-urlencoded, which means body parameters are sent as simple key:value pairs in the POST request, but with no information as to how that body parameter should be structured.

I would expect a body parameter to have a related consumes (at operation or root level) of `application/json', 'text/x-yaml', 'application/xml' or some other structured format.

Can you let me know if application/x-www-form-urlencoded really is the correct / working content-type for your POST request? There is a related PR (#15) but at the moment I am still unconvinced it is correct to merge that change.

Your Request definition is also missing a "type": "object" - if you add this and a structured consumes content-type, then the Request body parameter and all code-samples look correct to me.

from widdershins.

MikeRalphson avatar MikeRalphson commented on May 20, 2024

This is fixed in v2.0.2. The body parameters are handled in a different way, and the missing type: object in schema definitions is patched automatically.

from widdershins.

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.