Git Product home page Git Product logo

Comments (10)

MikeRalphson avatar MikeRalphson commented on May 18, 2024 1

Widdershins v3.0.0 has just been released.

from widdershins.

arparthasarathi avatar arparthasarathi commented on May 18, 2024 1

Thanks a lot for the update Mike!

from widdershins.

MikeRalphson avatar MikeRalphson commented on May 18, 2024

This is an artifact of the way the formData parameters are internally converted into the requestBody structure used by OpenAPI 3.0.

I'll add an option to omit the enclosing (fake) body parameter.

from widdershins.

arparthasarathi avatar arparthasarathi commented on May 18, 2024

Is there any way that I could prevent the enclosing from my side?

from widdershins.

MikeRalphson avatar MikeRalphson commented on May 18, 2024

You can patch openapix.js in function fakeBodyParameter and comment-out the first instance of the following line:

bodyParams.push(param);

It should be line 275.

from widdershins.

arparthasarathi avatar arparthasarathi commented on May 18, 2024

Perfect ! Thanks for the patch. Works seamlessly. You are awesome Mike, saving us a lots of time.

A quick question, why is that am getting the symbol >> before the parameters? Not a pressing issues, just for getting a deeper understanding of how the parser works.

screen shot 2017-11-15 at 5 19 15 pm

from widdershins.

MikeRalphson avatar MikeRalphson commented on May 18, 2024

That's because it's showing a nested properties under the object that we've just hidden.

If you change the offset 0 to -1 on the following line, they should go away:

let props = common.schemaToArray(data.bodyParameter.schema,0,{trim:true},data);

Line 278. Thanks for testing my changes I haven't even written yet!

from widdershins.

arparthasarathi avatar arparthasarathi commented on May 18, 2024

Awesome! Thanks for that :)

Mike, am also facing an issue with the required field as said above. If you take a look at the first screen shot, the parameter password is mentioned as required in the Swagger JSON but in the markdown, the field is set to false. And in the screenshot that I have added in the subsequent comment, every field is a required one. But only the email field is set as required.

Is this an issue or am I doing anything wrong?

from widdershins.

MikeRalphson avatar MikeRalphson commented on May 18, 2024

Mike, am also facing an issue with the required field as said above.

This was a bug in the OpenAPI 2.0 to 3.0 converter. When the next beta of widdershins is released (hopefully later today) it will have the updated converter dependency.

Thanks again for the testing and the bug reports!

from widdershins.

MikeRalphson avatar MikeRalphson commented on May 18, 2024

Apologies for the delay, [email protected] has just been released.

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.