stripe / openapi

An OpenAPI specification for the Stripe API.
MIT License
394 stars 123 forks source link

Questions about method_on in spec3.sdk.yaml #77

Closed kayuapi closed 3 years ago

kayuapi commented 3 years ago

Hi, I'm curious about the method_on attribute in spec3.sdk.yaml, so far I've discovered method_on: service, method_on: class, method_on: collection, and method_on: instance but I'm not sure exactly what they mean, specifically the difference between method_on: collection and method_on: class.

Could anyone help please?

richardm-stripe commented 3 years ago

Hi @kayuapi, we use these fields in an internal tool to control how stripe-java is generated w.r.t. how methods are organized into classes. I don't recommend you use method_on.

As a warning, most of the extensions in spec3.sdk.yaml aren't really intended for public consumption, and are subject to change/removal to a much higher degree than the standard parts of the spec. (Of course, we don't provide official stability guarantees for the standard spec either, but method_on in particular is something we are considering removing.)

richardm-stripe commented 3 years ago

Closing this out, let me know if you have any more questions!

kayuapi commented 3 years ago

Thank you!