Definitions for complex types not found on the API generated by the HTTP API dispatcher


I have an app that uses the HTTP API Dispatcher to handle REST clients.

My services and types are divided in two RODL files: the services one and the types one, which is referenced by the first one. I don’t have the “Generate Code for the definitions in this RODL file” check enabled on my services RODL, mostly because that negates the advantage/workaround for having the two separated: I originally had all my types and services on the same RODL, but the resulting files from time to time made C++Builder choke, so I started splitting the contents several months/years ago and haven’t looked back.

So, my problem now is that the swagger API generated by RO doesn’t include the type definitions anywhere. Just the reference, for instance:

        - Catalogos
        - Clientes
        - name: ClienteId
          in: path
          required: true
          type: integer
          format: int32
          description: The method call completed successfully
            $ref: '#/definitions/TClienteTS4'
          description: Bad Request
          description: Unauthorized
          description: Internal Server Error
        - Bearer: []

But on the JSON generated by the server there is no definition anywhere for TClienteTS4.

I don’t know if there is some setting I am missing or something like that? I believe before (some months ago?) that info was included, but I don’t know if I misconfigured something (can’t see anything that could imply to control that anywhere) or if this is a bug on the newer RO versions. I am on 1571. Version 1559 also works like this, but probably version 1555 did produce the API with the definitions included (I don’t have right now an easy way to try this, but for the time when I updated to the newer versions, I think it did)

I have tried with the IndyHTTP Server and the ROHTTP server, both produce the same.

The RODFILE.res is being generated by the IDE hookups, so it contains correctly both RODL files.

Any ideas?


Can you share your RODLs, pls?
I’ll review what is wrong

You can drop email to support@ for keeping privacy

Thanks Evgeny,

I’ve sent the files by email.


update uRORTTIServerSupport.pas as

procedure TRORTTIRODLReader.DoProcess(aLibrary: TRODLLibrary; aServiceGroup: string = '');
  for I := 0 to aLibrary.UseCount - 1 do   // added
    aLibrary.Use[i].Merged := False;       //added

or put {$UNDEF CodeFirst_Use_RODL_Uses} into

don’t forget to relaunch C:\Program Files (x86)\RemObjects Software\Build\install_RO.cmd (or install_DA.cmd) with admin rights.

Logged as bugs://D19396.

bugs://D19396 was closed as fixed.

Thank you. I went the UNDEF route and all is working as expected. I’ll wait for the next update to remove the UNDEF, I guess the code fix will be already included at that point.