Giter Club home page Giter Club logo

Comments (6)

PreciselyAlyss avatar PreciselyAlyss commented on August 16, 2024 1

@MikeRalphson The python template you made is working for GET requests, but the parameters aren't making it to any other requests.

image

image

from widdershins.

MikeRalphson avatar MikeRalphson commented on August 16, 2024

@bc-AlyssNoland the fix passed the test suite, so can you try it out from the repository version, or would you need a new version published to npm? With your example Python code template you are probably better off using the parameter.safeType pseudo-property as this normalises a few quirks.

from widdershins.

MikeRalphson avatar MikeRalphson commented on August 16, 2024

Hi @bc-AlyssNoland from that screenshot I can't quite see which post request is missing parameters. Could you let me have the /path ?

Edit: Is this because the template is using queryParameters, and the post requests only have body and path parameters? Does the python requests module know about replaceable path parameters, or is params only for queryString parameters?

I'm thinking about making the default code templates only list parameters which are in:query and required:true (using requiredParameters[]) to keep the size down. The option would still be there for all parameters to be listed in user templates by iterating through one of the other arrays.

from widdershins.

PreciselyAlyss avatar PreciselyAlyss commented on August 16, 2024

https://gist.github.com/bc-AlyssNoland/2f64aa9041a794f93712d8b4a6a4649a
https://gist.github.com/preciselyAlyss/2f64aa9041a794f93712d8b4a6a4649a

I posted the output of the file in the gist above. It seems some GET and DELETE requests are getting the parameters. I agree with only listing things that are required. We (my company) actually use an extension to indicate which fields are required by operation, but I can work on modifying a fork to accommodate that.

amount:
        type: number
        format: double
        description: |
          The value of the adjustment by the bulk pricing rule.
        x-required:
          - post
          - put
        minimum: 0

from widdershins.

MikeRalphson avatar MikeRalphson commented on August 16, 2024

@bc-AlyssNoland Thanks, will take a look at the gist.

You should be able to use the new template callback feature to flip the parameter.required value based on your vendor extension if you want to avoid forking in this case.

from widdershins.

MikeRalphson avatar MikeRalphson commented on August 16, 2024

@PreciselyAlyss I believe the underlying bug has been fixed and is in v1.1.0 - please feel free to re-open this issue if there is still something outstanding, or to raise a new one. Thanks.

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.