Skip to content
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

chore(gen): remove deprecated swagger-typescript-api-nextgen #1268

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

polomani
Copy link
Collaborator

@polomani polomani commented Feb 6, 2025

swagger-typescript-api-nextgen (fork) was deprecated a long time ago, we need to replace it with the well-maintained swagger-typescript-api (helps with getting rid of CVEs)

@polomani polomani requested review from andersfylling and a team as code owners February 6, 2025 15:41
@polomani polomani changed the title chore(gen): remove deprecated swagger-typescript-api-nextgen package chore(gen): remove deprecated swagger-typescript-api-nextgen Feb 6, 2025
@polomani polomani requested review from a team as code owners February 6, 2025 15:46
@polomani
Copy link
Collaborator Author

polomani commented Feb 6, 2025

@andersfylling could you have a look if there is an easy way to fix failing tests?

@andersfylling
Copy link
Contributor

now I am not sure why it was used instead of the original swagger-typescript-api

the maintainer just went afk for a long while, so made the switch. Seems it's active again 🙏

@andersfylling
Copy link
Contributor

what had happened was that the updated library had some changes to formatting and supports more openapi features, so we had to update the expected output files to match this. Some of the tests will generate some typescript definitions from openapi yaml, and match that against an expected output file (which we now updated to include the newer features).

*/
attributes?: Record<
string,
| ({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks kind of weird?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree this seems broken (initially was correct)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andersfylling can we override this type somehow?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll have a look again later today

@andersfylling
Copy link
Contributor

@marvrez or @miladcognite can you verify the changes to vision?

@andersfylling
Copy link
Contributor

@peetcremer1 or @olacognite can you verify changes to annotations?

description?: string;
type: 'boolean';
type: boolean;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks sketchy

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

string was correct here
Screenshot 2025-02-07 at 09 52 51

externalId?: string;
};
/**
* primitives.attributes.Boolean
Copy link
Collaborator Author

@polomani polomani Feb 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you know if we can remove these primitives.attributes annotations? they seem useless
@andersfylling

Copy link

@olacognite olacognite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG annotation-wise

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants