Git Product home page Git Product logo

Comments (6)

brandur-stripe avatar brandur-stripe commented on June 30, 2024

I just wanted to say for now: thank you for the detailed report here.

Unfortunately, I'm not sure when I can get around to fixing most of this, but it's good to have this level of detail of information available.

from openapi.

mutsys avatar mutsys commented on June 30, 2024

No doubt that this would be a large effort if you were to try and and attack this by fixing code and Swagger annotations, but it isn't such a big deal if you clean it up in a post-processor like I did. I would be happy to share my preprocessSwagger method in the swagger-codegen plugin I created. It cleans everything up enough so that it passes validation and can be used with swagger-codegen. It is written in Java, of course, but it would be rather easy to translate it to the Ruby equivalent. Just tack it on to the end of your build process and you should be good to go.

from openapi.

brandur-stripe avatar brandur-stripe commented on June 30, 2024

@mutsys Thanks a lot for the offer!

I think you're right in that applying a post processor would be the easiest fix for our problems, but I kind of feel like we'd just be papering over real problems and adding another layer of complexity overhead to our stack. Pretty much everything here is representative of an actual issue (e.g., non-unique operation IDs), and by far the cleanest fix is one that happens right at the root where we generate the original spec.

from openapi.

sanderPostma avatar sanderPostma commented on June 30, 2024

How about this one: all input parameters are defined as body parameters while Stripe wants x-www-form-urlencoded which is defined like this:
` parameters:

    - in: formData

      name: name

      type: string

      description: A person's name.

    - in: formData

      name: fav_number

      type: number

      description: A person's favorite number.

`

from openapi.

brandur-stripe avatar brandur-stripe commented on June 30, 2024

@sanderPostma I'm sorry to say that one is certainly not going to be changed.

The formData specification is simply not adequately expressive enough for our purposes, which often include more complex data structures. OpenAPI 3.0 does a better job of addressing this, so I'd recommend moving to that for a system that's a little more adherent to recommended practices.

I'm also not even sure this is necessarily invalid. Reading describing request body, it's suggested that formData is usually used, but the language doesn't imply that that use is necessarily exclusive.

from openapi.

pakrym-stripe avatar pakrym-stripe commented on June 30, 2024

I apologize for the extremely delayed response.

We've since moved to OpenAPI v3 and improved the quality of API descriptions. If you encounter problems when using the new OpenAPI 3 spec please file a new issue.

from openapi.

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.