hyperledger-firefly / hyperledger-firefly/firefly

OpenAPI spec does not report response schema for paginated results

Open
#1,117 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
602
Forks
246
Avg merge
18h 47m
Merged PRs (30d)
6

Description

Most "get many" APIs in FireFly support returning a flat list of results OR a paginated list (with the list in an `items` child next to other fields describing pagination and count metadata).

The generated OpenAPI spec only reports the "flat list" response format. In reality, it should use `oneOf` to indicate that the return may be in either format.

This change will also imply some thinking about how it affects https://github.com/hyperledger/firefly-sdk-nodejs, as that code is largely generated from the OpenAPI spec, and will need to intelligently assign types to returned results without requiring lots of inspection to determine "is this result paginated or not".

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.