Comments (4)
Thank you @performanceArtist, this will be included in next release.
from binance-api-swagger.
Hey @performanceArtist, this project's target is Swagger UI, but we can consider adding more openAPI specs for local code generation use cases.
Everything under schemas
is for different responses' json content and all its properties are required. Testing with openapi-typescript
tool, it seems to generate all the properties correctly, can you share how you're generating your local code, pls?
from binance-api-swagger.
Testing with openapi-typescript tool, it seems to generate all the properties correctly
All the properties in responses[200]
section are optional, which is not correct - this is exactly what I was talking about. For example:
/** Average price */
200: {
content: {
"application/json": {
mins?: number;
price?: string;
};
};
};
And here's how the schemas look after generation, everything is also optional:
export interface components {
schemas: {
account: {
makerCommission?: number;
takerCommission?: number;
buyerCommission?: number;
sellerCommission?: number;
canTrade?: boolean;
canWithdraw?: boolean;
canDeposit?: boolean;
updateTime?: number;
accountType?: string;
balances?: {
asset?: string;
free?: string;
locked?: string;
}[];
};
Regardless of a generation tool chosen, it should mark these properties as optional, since it is implied by the absence of required
.
from binance-api-swagger.
we can consider adding more openAPI specs for local code generation use cases
Is there any point in separating? Adding required
would only make the spec more accurate. And it should not affect the ui.
from binance-api-swagger.
Related Issues (10)
- Make it possible to generate API client from swagger file HOT 1
- 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.