Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Actions to support arrays returned #248

Open
nathan-t-lr opened this issue Apr 27, 2022 · 0 comments
Open

Actions to support arrays returned #248

nathan-t-lr opened this issue Apr 27, 2022 · 0 comments
Labels
change/standard Trivial / minor changes that are low-impact, low risk enhancement New feature or request

Comments

@nathan-t-lr
Copy link
Contributor

Description

Often is the case where our team wants to return an array structure in a custom action. This is most often for custom search methods. As it is currently, we have to wrap the response in an object, which both messes up our dotviz diagrams and is not convenient. This issue was previously mention in this slack thread.

Expectation

The following was taken from the api-specs asset-lifecycle-api directory:

Current Feature:

sync bulk action v3/Asset::get {
    "Identifier objects used to request an `Asset`"
    assetIDs: value-of AssetV3BulkGetRequest[]
    "The amount of detail to return for the `Asset`."
    includes: value-of AssetV3IncludesEnum[1..3] optional
    /operations
        POST
            "OK" 200
                MultigetResponseV3 // this is a `structure` that wraps our `AssetV3BulkGetResponse[]` structure
}

Desired Feature:

sync bulk action v3/Asset::get {
    "Identifier objects used to request an `Asset`"
    assetIDs: value-of AssetV3BulkGetRequest[]
    "The amount of detail to return for the `Asset`."
    includes: value-of AssetV3IncludesEnum[1..3] optional
    /operations
        MULTIPOST
            "OK" 200
                AssetV3BulkGetResponse
}

Solution:

My guess is to allow an action to accept MULTI-verbs as I have shown in the desired feature.

@nathan-t-lr nathan-t-lr added enhancement New feature or request change/standard Trivial / minor changes that are low-impact, low risk labels Apr 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
change/standard Trivial / minor changes that are low-impact, low risk enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant