-
Notifications
You must be signed in to change notification settings - Fork 165
Support for code generation #1143
Comments
See my patched repo for code generation: https://github.com/kzhang-dsg/bigcommerce-api-specs/ I use my patched repo to generate models in my typescript bigcommerce-api-client project: https://github.com/kzhang-dsg/bigcommerce-api-client I also raised several PRs from my patched repo, but those changes haven't got merged yet: |
@petedoyle @kzhang-dsg and @bobbyshaw -- see the excellent work @bobbyshaw has done to standardize operationIds over at bigcommerce/docs 45. I'm hoping to get it merged up this coming week, with tags pushed so people using more manually created clients can find the last "good" commit for their codebase. I'm going to close this out and mention it in PR 45 so you can more conveniently check the status. You can open new issues over at bigcommerce/docs. Thanks for building with BigCommerce and contributing to the quality of our DX! |
…tent & programmatic (#45) <!-- Ticket number or summary of work --> # [DEVDOCS-4878] > As per OpenAPI specification guidance for operationID field, follow programmatic conventions for operationId field. To me that means as if I were defining a method or function name. > This field is not used in the API docs as far as I can tell. There were many different naming conventions across APIs. I've aligned to be camel case. > This helps facilitate API SDK generation as all endpoints can have a function name based on the operation ID and have it have sufficient context to be unique amongst all APIs. ## What changed? * Make operation IDs consistent and follow programmatic conventions ## Release notes draft * A valued partner has put in the heroic work to make the OAS operation IDs programmatic across our public APIs. The operationId property is now consistently camelCase and relates to the plain-language name of the endpoint. Thanks, @bobbyshaw! ## Anything else? * Original PR [bigcommerce/api-specs 1469](bigcommerce/api-specs#1469) * Related Issue [bigcommerce/api-specs 1143](bigcommerce/api-specs#1143) * Tag for last commit before this -- https://github.com/bigcommerce/docs/releases/tag/before-operation-id-change --------- Co-authored-by: Tom Robertshaw <[email protected]>
A question more than anything. :) Thanks for listening.
I know this repo is about generating docs, but I'd also love to generate models/clients. For the past couple of years it's been pretty common for the specs to have (sometimes small) validation errors when using the official OpenAPI generator.
Any thoughts on extending the scope of this project to also be useful for generating models/clients? Ideally, it'd be amazing to validate in CI during PRs, such that the specs on the default branch (currently
master
) always validate and succeed in generating code.As a customer of the BigCommerce API, my ideal usage is to 1) read the docs enough to understand the big picture of how the API works, then 2) generate all the code needed to interact with the API. This is much easier than having to read the docs in great enough detail to write my own client.
Thanks for the work you all do to keep these docs up to date! :)
The text was updated successfully, but these errors were encountered: