Conversation
There was a problem hiding this comment.
The way I am understanding is..
we really need only the exchangeDownloader. Other tools are only wrappers around the openapi tools
Why do we need the wrapper?
Why can't we directly call the open api command? This seems to be an unnecessary additional layer.
My suggestion is...we should directly call open api tools in the SDKs and just use the downloader from raml toolkit. This way it is easier to deprecate the raml-toolkit in future
unandyala
left a comment
There was a problem hiding this comment.
Left few minor comments
|
|
||
| // Not all API files in anypoint exchange have an associated fat-as classifier. so | ||
| // we return null here for those cases | ||
| if (!found) { |
There was a problem hiding this comment.
Not sure of the impact of this. Does it make sense to add a warning?
There was a problem hiding this comment.
This is because we run the same getFileByClassifier for both oas and raml files: https://github.com/SalesforceCommerceCloud/raml-toolkit/blob/oas-support/src/download/exchangeDownloader.ts#L160
But for the raml files up on anypoint exchange, they won't have a fat-oas so we early exit rather than trying to read properties from null.
README.md
Outdated
|
|
||
| #### `raml-toolkit diff BASE NEW -s oas` | ||
|
|
||
| **Note:** This command requires that oasdiff is. installed. Install oasdiff according to https://github.com/oasdiff/oasdiff#installation |
There was a problem hiding this comment.
Nit: Let's move this to the top of the file to make it more visible before users run into an error trying to using oas
|
Tested these changes locally with |
This PR introduces support for OAS templates by:
openapi-generatorto facilitate SDK generation from OAS as well as template initializationoasdiffto handle checking for API spec changesNotes:
This is not intended to be a breaking change. All raml facilities will continue to work as-is.
The
lintcommand is out of scope for this change.raml-toolkit lintwill only support RAML files.