danielgtaylor / danielgtaylor/openapi-cli-generator

Links Support

Open
#4 0 comments 0 reactions 0 assignees View on GitHub
feature help-wanted
Dominant language
Go
Stars
218
Forks
54
PR merge metrics
No merged PRs in 30d

Description

Add the ability to follow [OpenAPI 3 links](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md#linkObject) to fetch additional data and add it to the response for a given operation. For example, you might get an item overview with a link to get item details. A new CLI option like `--link=details` could then be used to trigger the additional request and put a `details` field into the response with the response data from the details call. All of this would happen before response filtering/projection so you can select just the fields you care about.

Bonus: support an extension like `x-collection` so this works for calls that return a list of items, so that you can get the link for each item in the list by treating index 0 as a wildcard in the body pointer.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.