Comments (1)
Currently, swagger-codegen doesn't support oneOf and anyOf tags, sot it needed to be manually fixed each time.
The lack of a functionality of a third-party tool should not impact the content of the core swagger file. Therefore, the ideal solution is for the third-party tool to support oneOf
and anyOf
tags.
Also, it's just stupid to make things this way. For example:
Endpoint /sapi/v1/accountSnapshot has parameter "type" which is enum with values [SPOT, MARGIN, FUTURES] and depending on its value endpoint returns one of [snapshotSpot, snapshotMargin, snapshotFutures]. Which is.. just madness if you use strong-typed language (using weak/dynamic typed language to trade crypto is madness itself).
Why don't simple use 3 endpoints with 3 different returning types instead?
/sapi/v1/accountSnapshotSpot -> snapshotSpot
/sapi/v1/accountSnapshotMargin -> snapshotMargin
/sapi/v1/accountSnapshotFutures -> snapshotFutures
This is a design of the API not the swagger implementation.
No hope you will fix first 2 points, but this one is pretty simple. Please, move inlined responses to the components section. Currently this structures has no names, so swagger-codegen naming it like InlineResponse2005, InlineResponse20054, etc. But when you use a language with types, it is very nice to have not just a variable with some sort of data, but also its type which may be a hint by itself in some cases.
Response schema are only moved to the components sections when the schema is used more than once in multiple endpoints, to avoid redundancy.
Overall, the swagger implementation is not intended to be defined by third-party tools.
from binance-api-swagger.
Related Issues (10)
- Required properties HOT 4
- yaml生成代码后,time字段类型默认设置为int32类型和double类型 HOT 1
- Help
- Get my account and assets back
- Actively maintained? HOT 4
- Fetch deposit history - Missing from documentation HOT 1
- 7c5ac90c6f5937fa62c61d73f8255822ac58490d HOT 1
- Release fapi, dapi (and others) in swagger form HOT 2
- missing headers for X-MBX-USED-WEIGHT and Retry-After HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from binance-api-swagger.