api-client-generator
api-client-generator copied to clipboard
5.0 release (beta)
Beta version of the generator has been released, it brings many fixes and improvements. Please test this version and report inconsistencies/bugs so we can fix them for the final release
Is this the release that adds OpenApi 3.0 support? Would love to test it.
Hi, OA3.0 is not part of the 5.0 release (yet), I'm preparing the codebase for it, but I'll need to broader up the test suite and also decide if we'll support both versions side by side or convert v2 to v3 before generating (2nd is preferred).
It would help if you could share what API are you planning to use the generator on (if can be shared). Feel free to reach out via email. If your definition is not sharable, my call for public OA3.0+ version API definitions is still on :shipit:
@vmasek I have just transitioned from 4.x to beta-5
. Everything seems to work fine and i got rid of circular dependencies which appeared with version 4.x.
Should I be aware of any breaking changes in behavior that I am missing right now?
@hoebbelsB only breaking change there should be at this moment are moved interfaces mentioned here https://github.com/flowup/api-client-generator/releases/tag/5.0.0-beta.0
There might be more to come but I'll try to keep it on a minimum for the final release.
thanks :)
A hiccup I just encountered: query-param lists are now generated as ?param=value,value whereas previously he would generate ?param=value¶m=value
But that's probably something that we will just change in our api.
@Mvrlex CSV
format is the default in angular and we currently don't support a multiple of them. But this is something that I'd like very much for the final release as it is usual that backends don't support all of them.
It is documented in this issue https://github.com/flowup/api-client-generator/issues/104
@Mvrlex could you have a look on your swagger file if there is collectionFormat
set to multi
so we know it starts autodetecting the format after the feature lands?
@Mvrlex could you have a look on your swagger file if there is
collectionFormat
set tomulti
so we know it starts autodetecting the format after the feature lands?
Adding the collectionFormat unfortunately did not change the generation behaviour.
This is the input (obscured):
/v0/bla:
get:
operationId: getBla
parameters:
- name: expandables
in: query
type: array
collectionFormat: multi
items:
type: string
enum: [val1, val2]
required: false
This is the output:
if ('expandables' in args) {
options.params = options.params.set('expandables', String(args.expandables));
}
@Mvrlex thanks, I'll try to have a look at this feature soon as it is definitely needed for the release and needs to be tested in time :shipit: