Project

General

Profile

Actions

Question #1696

closed

API: Bug in generated client code

Added by Eugen Hotwagner about 2 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Category:
API
Target version:
-
Start date:
2022-04-19
Estimated time:

Description

I generated a fsharp client using two different tools and have noticed a few empty results for certain methods. Fe:

type GetApi03Classes =

| OK of payload: list<ClassMappingModel>
| NotFound

is ok since it has a payload but:

type GetApi03CidocClassByCidocClass =

| OK
| NotFound

does not. I assumed that this was due to some bug in the fsharp tools but looking into other generated clients on swaggerhub (csharp, java, scala) have the same problem (i think). There is an online tool to test swagger apis here: https://apitools.dev/swagger-parser/online/
that results for the OA api:

@This API is valid, but it cannot be shown because it contains circular references

TypeError: Converting circular structure to JSON
--> starting at object with constructor 'Object' | property 'properties' -> object with constructor 'Object' | property 'children' > object with constructor 'Object'
--
property 'items' closes the circle
at JSON.stringify (<anonymous>)
at toText (https://apitools.dev/swagger-parser/online/js/bundle.min.js:17:226677)
at Function.editors.addResult (https://apitools.dev/swagger-parser/online/js/bundle.min.js:17:227813)
at Function.editors.showResult (https://apitools.dev/swagger-parser/online/js/bundle.min.js:17:227094)
at https://apitools.dev/swagger-parser/online/js/bundle.min.js:17:231618
at Array.forEach (<anonymous>)
at https://apitools.dev/swagger-parser/online/js/bundle.min.js:17:231598@

which is a likely reason that many code generation tools fail.


Related issues 1 (1 open0 closed)

Related to OpenAtlas - Feature #1749: API: Testsystems for API Acknowledged2022-06-14Actions
Actions

Also available in: Atom PDF