You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This library currently has two methods getSnippets and getEndpointSnippets, the latter of which depends on 4 arguments which must be provided in the right order. Adding additional arguments (e.g., as suggested in #62) would decrease usability, arguably.
I think that generally, the API of this library might be improved to become:
OpenAPISnippet.getSnippets(openApi, options)
..., where options may contain things like targets and path + method to select which operation to generate snippets for (instead of having a separate method getEndpointSnippets). This refactor would make it more feasible to add further options. E.g., w.r.t. #62 it could also contain a new serverIndex option to denote which server to use.
Any thoughts?
The text was updated successfully, but these errors were encountered:
This library currently has two methods
getSnippets
andgetEndpointSnippets
, the latter of which depends on 4 arguments which must be provided in the right order. Adding additional arguments (e.g., as suggested in #62) would decrease usability, arguably.I think that generally, the API of this library might be improved to become:
..., where options may contain things like
targets
andpath
+method
to select which operation to generate snippets for (instead of having a separate methodgetEndpointSnippets
). This refactor would make it more feasible to add further options. E.g., w.r.t. #62 it could also contain a newserverIndex
option to denote which server to use.Any thoughts?
The text was updated successfully, but these errors were encountered: