-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(api): creating LICENSE files and and SDK headings #786
Conversation
@@ -510,6 +514,10 @@ sdk.server('https://eu.api.example.com/v14');`), | |||
tsup: tsupOptions as JsonObject, | |||
}; | |||
|
|||
if (!this.spdxLicense) { | |||
delete pkg.license; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doing this instead of adding license
to pkg
here because I like having license
slotted into the object where it is instead of after tsup
. 💅
* Detailed information on using this API can be found in the Ably <a | ||
* href="https://ably.com/documentation/control-api">developer documentation</a>. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Annoying that they have HTML elements in this but I don't really have any desire to pull in a Markdown parser to convert these.
info
objects to SDK docblocks@@ -97,22 +97,16 @@ function assertSDKFixture(file: string, fixture: string) { | |||
|
|||
describe('typescript', () => { | |||
beforeEach(() => { | |||
vi.setSystemTime(new Date('2023')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had to change this to a fuller date because new Date('2023').getFullYear()
returns 2022.
/** | ||
* Quirky `operationID` cases | ||
* | ||
*/ | ||
const createSDK = (() => { return new SDK(); })(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a few tiny nits but otherwise LGTM!
🧰 Changes
LICENSE
file in the codegen'd SDK directory if we're able to recognize a license in their OpenAPI definitioninfo.license
object.license
property to thepackage.json
file if we have a recognized license.SDK
class containing various pieces of data from their OpenAPI definitioninfo
object including:title
,description
, andtermsOfService
This is what it all looks like on a fully specced out definition: