-
Notifications
You must be signed in to change notification settings - Fork 13
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
[SDK dogfooding] Refactoring, split API's, new assembling, Swagger #97
Conversation
Socket Security Pull Request Report👍 No new dependency issues detected in pull request Pull request report summary
Bot CommandsTo ignore an alert, reply with a comment starting with Powered by socket.dev |
ESLint Summary View Full Report
Report generated by eslint-plus-action |
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.
SOFT APPROVE! This looks like a great PR!
As small criticism, still mixes a bunch of unrelated things, but I review and I'm mostly good. And I see you did a lot of PR in an attempt to make them easier to review. I appreciated that! 😃
The only things I would ask is:
- Diagrams: I really like we are doing documentation, but Im reluctant to use Plant UML. Let me do a counter-proposal. Also, maybe the diagram is not 100% valid UML. Lastly, it would be nice to be easily part of the documentation and this is generated automatically. I have a plan for this, let me get back at you later. (You can merge though, my counter-proposal could come on top)
- Before Merge: Please, let's make sure we test the consumption of this library in different environments. Pure commonJS nodeJS app, CRA website using ES6 imports, etc (in the past we had issues, so i want to make sure we don't shoot ourselves on the foot from changing a library).
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.
Very nice, thanks for putting up with my nitpicks so far
Talking about that, a few more comments. Nothing major.
Fixes cowprotocol/cowswap#2045 To avoid code duplication and have one source of truth we decided to generate typescript code based on Swagger scheme: cowprotocol/cow-sdk#97 This PR levels out contradictions between the openapi scheme and the implementation.
Docs: https://www.notion.so/cownation/FE-SDK-Dogfooding-our-own-SDK-in-CoW-Swap-ce502a2dfb3f423bb9c7998de4237575
Swagger: cowprotocol/services#1208
Explorer dogfooding: cowprotocol/explorer#352
CowSwap dogfooding: cowprotocol/cowswap#2071
Changes
Metadata
,Subgraph
andOrder book
APIsOrder book
API is based on autogenerated typescript code from SwaggerContext
, now each API constructor receives only environment:prod
|staging
@cowprotocol/contracts
package0x
andParaswap
APIs because they are irrelevantBundle