api-client-generator icon indicating copy to clipboard operation
api-client-generator copied to clipboard

5.0 release (beta)

Open vmasek opened this issue 4 years ago • 10 comments

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

vmasek avatar Dec 22 '20 15:12 vmasek

Is this the release that adds OpenApi 3.0 support? Would love to test it.

Mvrlex avatar Feb 15 '21 08:02 Mvrlex

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 avatar Feb 16 '21 16:02 vmasek

@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 avatar Feb 23 '21 22:02 hoebbelsB

@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.

vmasek avatar Feb 24 '21 09:02 vmasek

thanks :)

hoebbelsB avatar Feb 26 '21 09:02 hoebbelsB

A hiccup I just encountered: query-param lists are now generated as ?param=value,value whereas previously he would generate ?param=value&param=value

But that's probably something that we will just change in our api.

Mvrlex avatar Mar 02 '21 17:03 Mvrlex

@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

vmasek avatar Mar 03 '21 12:03 vmasek

@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?

vmasek avatar Mar 03 '21 12:03 vmasek

@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?

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 avatar Mar 03 '21 16:03 Mvrlex

@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:

vmasek avatar Mar 03 '21 18:03 vmasek