Comments (4)
How are the bunq sdks (python, php, csharp) generated? Are they also using the openapi generator?
No, this is done via an internal generator that also happens to generate the Swagger.json
The swagger.json that bunq provides is to new to be generated with that tool. I recall there is an issue for this in their repo. bunq is using openApi3 which is not supported by that too yet.
Reference: swagger-api/swagger-codegen#6598
However, I'm not sure openapi-generator-cli.jar
uses swagger-codegen. It could be that {basePath}
in the URL is illegal according to the open API 3 spec but I'm not sure if that's the case.
from doc.
Ah ok interesting. So the swagger file is mostly for ReDoc?
It seems like OpenAPI v3 should be good with {parameters} in the url. (https://swagger.io/docs/specification/describing-parameters/)
The server objects also allows for parameters (https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#server-object)
It seems that https://github.com/openapitools/openapi-generator is a fork of swagger-codegen.
Running the command locally on the same file does not return the URL errors. Only the other errors. So that is very strange..
wget https://raw.githubusercontent.com/bunq/doc/master/swagger.json
java -jar openapi-generator-cli.jar generate -i swagger.json -g go -o ./bunq &> local_output.txt
Exception in thread "main" org.openapitools.codegen.SpecValidationException: There were issues with the specification. The option can be disabled via validateSpec (Maven/Gradle) or --skip-validate-spec (CLI).
| Error count: 52, Warning count: 2
Errors:
-attribute components.schemas.NoteAttachmentIdealMerchantTransaction_5be1e76160c9d.properties is not of type `object`
-attribute components.schemas.NoteAttachmentPayment_5be1e76173c42.properties is not of type `object`
-attribute components.schemas.DraftShareInviteApiKeyQrCodeContent_5be1e75ebc5ad.properties is not of type `object`
-attribute components.schemas.TabQrCodeContent_5be1e765a27f4.properties is not of type `object`
-attribute components.schemas.NoteAttachmentPaymentBatch_5be1e7616bfd1.properties is not of type `object`
-attribute components.schemas.TabUsageSingle_5be1e765ac20a.properties is not of type `object`
-attribute components.schemas.NoteTextSofortMerchantTransaction_5be1e7618aa66.properties is not of type `object`
-attribute components.schemas.AttachmentTab.properties is not of type `object`
-attribute components.schemas.TabUsageMultiple_5be1e765a522c.properties is not of type `object`
-attribute components.schemas.NoteAttachmentScheduleInstance_5be1e761841b9.properties is not of type `object`
-attribute components.schemas.NoteTextWhitelistResult_5be1e7618e74b.properties is not of type `object`
-attribute components.schemas.NoteTextMasterCardAction_5be1e7616a142.properties is not of type `object`
-attribute components.schemas.NoteTextIdealMerchantTransaction_5be1e7616501a.properties is not of type `object`
-attribute components.schemas.NoteAttachmentBunqMeFundraiserResult_5be1e76159505.properties is not of type `object`
-attribute components.schemas.AttachmentPublicContent_5be1e75e5b254.properties is not of type `object`
-attribute components.schemas.NoteAttachmentRequestInquiryBatch_5be1e76177e58.properties is not of type `object`
-attribute components.schemas.ScheduleUser_5be1e765663e0.properties is not of type `object`
-attribute components.schemas.AttachmentConversationContent_5be1e75e5a571.properties is not of type `object`
-attribute components.schemas.NoteTextRequestResponse_5be1e761824fb.properties is not of type `object`
-attribute components.schemas.NoteAttachmentBankSwitchServiceNetherlandsIncomingPayment_5be1e76154f08.properties is not of type `object`
-attribute components.schemas.Session_5be1e7657b84d.properties is not of type `object`
-attribute components.schemas.NoteAttachmentMasterCardAction_5be1e7616704c.properties is not of type `object`
-attribute components.schemas.TabItemShop_5be1e7657fc43.properties is not of type `object`
-attribute components.schemas.NoteTextDraftPayment_5be1e7615f12c.properties is not of type `object`
-attribute components.schemas.NoteAttachmentWhitelistResult_5be1e7618c958.properties is not of type `object`
-attribute components.schemas.ExportAnnualOverview_5be1e76103da1.properties is not of type `object`
-attribute components.schemas.DraftShareInviteBankQrCodeContent_5be1e75ebf101.properties is not of type `object`
-attribute components.schemas.SchedulePaymentBatch_5be1e7652e387.properties is not of type `object`
-attribute components.schemas.CertificatePinned_5be1e75e979d5.properties is not of type `object`
-attribute components.schemas.SandboxUser.properties is not of type `object`
-attribute components.schemas.SchedulePayment_5be1e76537a3a.properties is not of type `object`
-attribute components.schemas.AttachmentTabContent_5be1e75e5bb2d.properties is not of type `object`
-attribute components.schemas.ExportAnnualOverviewContent_5be1e761027be.properties is not of type `object`
-attribute components.schemas.NoteTextRequestInquiryBatch_5be1e7617a11c.properties is not of type `object`
-attribute components.schemas.CustomerStatementExportContent_5be1e761051d6.properties is not of type `object`
-attribute components.schemas.AttachmentPublic.properties is not of type `object`
-attribute components.schemas.NoteTextScheduleInstance_5be1e76186266.properties is not of type `object`
-attribute components.schemas.Whitelist_5be1e75f4f26d.properties is not of type `object`
-attribute components.schemas.CashRegisterQrCodeContent_5be1e75e85b04.properties is not of type `object`
-attribute components.schemas.NoteAttachmentRequestResponse_5be1e7618030d.properties is not of type `object`
-attribute components.schemas.NoteTextPayment_5be1e76175f59.properties is not of type `object`
-attribute components.schemas.TabAttachmentTabContent_5be1e75e5c5bf.properties is not of type `object`
-attribute components.schemas.NoteAttachmentRequestInquiry_5be1e7617bdb3.properties is not of type `object`
-attribute components.schemas.NoteTextPaymentBatch_5be1e76171b90.properties is not of type `object`
-attribute components.schemas.AttachmentMonetaryAccount.properties is not of type `object`
-attribute components.schemas.CustomerStatementExport_5be1e761085da.properties is not of type `object`
-attribute components.schemas.NoteAttachmentSofortMerchantTransaction_5be1e76188575.properties is not of type `object`
-attribute components.schemas.NoteTextRequestInquiry_5be1e7617dea5.properties is not of type `object`
-attribute components.schemas.ShareInviteBankAmountUsed_5be1e7610d237.properties is not of type `object`
-attribute components.schemas.NoteAttachmentDraftPayment_5be1e7615cd09.properties is not of type `object`
-attribute components.schemas.NoteTextBankSwitchServiceNetherlandsIncomingPayment_5be1e7615755e.properties is not of type `object`
-attribute components.schemas.NoteTextBunqMeFundraiserResult_5be1e7615b22c.properties is not of type `object`
Warnings:
-Unused model: Avatar_5be1e75e3de25
-Unused model: Tab_5be1e75f49f9e
at org.openapitools.codegen.config.CodegenConfigurator.toClientOptInput(CodegenConfigurator.java:569)
at org.openapitools.codegen.cmd.Generate.run(Generate.java:348)
at org.openapitools.codegen.OpenAPIGenerator.main(OpenAPIGenerator.java:62)
The remaining issues seem to be related to the properties being an array. Which should be an object:
Current
"NoteAttachmentIdealMerchantTransaction_5be1e76160c9d": {
"type": "object",
"properties": [],
"required": []
},
Properties should be an object:
"NoteAttachmentIdealMerchantTransaction_5be1e76160c9d": {
"type": "object",
"properties": {},
"required": []
},
from doc.
Ah ok interesting. So the swagger file is mostly for ReDoc?
No, ReDoc is not being used anymore. The "official" swagger viewer is being used now. #56
You're indeed correct about the properties. They should be an object not array, that's indeed a bug in the generator.
from doc.
Hi @vverst! Just a small heads up that we're actively working on improving OpenAPI file generation so that it's actually compliant with the spec.
However do note that it may take some time, as we're solving some structural internal problems in the meantime. Also, SDK generated that way might not be the best result anyway, and hand-crafted approach similar to https://github.com/bunqCommunity/bunqJSClient might be better.
from doc.
Related Issues (20)
- Add Google Tag Manager snippet to Doc HOT 1
- Fix broken internal links and add external resources
- Events response section can not be rendered HOT 1
- PSD2 production request
- PSD2 production request
- OAuth Sandbox URL undocumented HOT 2
- OpenAPI specification still mentions ShareInviteBankInquiry
- Signing response return error without explanation HOT 1
- CardCredit.founder_number is missing from the OpenAPI definition HOT 1
- ShareInviteBankResponse.relation_user is missing from the OpenAPI definition HOT 2
- Quick Start page instructions look really bad HOT 2
- Datetime timezones
- Add Developer Portal link to sidebar.
- Updated dependencies to resolve vulnerabilities
- Dead link HOT 1
- Convert object operation to PascalCase
- Sign up and support
- Add section on OAuth callback URL
- Swagger/DOC doesn't fit to API HOT 2
- raw.githubusercontent.com/bunq/doc/master/swagger.json
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 doc.