Skip to content

Generated output units are not persistent (sorting differs sometimes) #45

@Delphi-FPC-Lazarus

Description

@Delphi-FPC-Lazarus

Hi,

currently testing Release 1.17 and found an issue,
When generating an OpenAPI Client several times, only difference to previous units should be UUID and possibly changes that where made in source json.
But Sometimes sorting of methods sorting is completely different which will make problems when using version control. It's difficult to see "real" changes to previous version.

How to reproduce:

I was able to reproduce with PetStoreExample, just call the OpenApiDelphiGen several times

set GENERATOR="D:\Data\OpenAPI\Generator\OpenApiDelphiGen.exe"
set SOURCE="https://petstore.swagger.io/v2/swagger.json"
set DEST="D:\Data\OpenAPI\Out\PetStore"
set UNITNAME=PetStore
%GENERATOR% -i:%SOURCE% -o:%DEST% -n:%UNITNAME% -m:MultipleClientsFromFirstTagAndOperationId

  • First Call: Units are genererated (make a copy)
  • Second Call: Units regenerated, The only difference to the previous version are the three UUIDs [OK]
  • Third Call: Sorting in PetStoreClient/Dtos/Json is different to previous version [NOK]
  • ...
  • Several Calls Later: Sorting switches Back to original sorting, only difference are the three UUIDs [OK]
    (in real world, if source json changed, there would be new methods)

That's something important that should be fixed. The Problem may depend on TMS BIZ.

regards
Peter

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions