Skip to content

GET/DELETE operations generated with body with httpQuery #1326

@luigi617

Description

@luigi617

Describe the bug

According to the specification:

Every request for the rpcv2Cbor protocol MUST be sent using the HTTP POST method. HTTP binding traits MUST be ignored when building rpcv2Cbor requests if they are present.

However, adding @httpQuery to request variables still generates GET and DELETE operations that expect a body.

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected behavior

I think the SDK should prevent operation being generated.

Current behavior

SDK still generates operations which will expect body when @httpQuery is provided in Input.

Steps to Reproduce

Build the main branch and use the following smithy file to generate client protocol.

@rpcv2Cbor
service GreeterService {
    version: "1.0.0"
    operations: [
        GetTest
    ]
}

@http(method: "GET", uri: "/get", code: 200)
operation GetTest {
    input: GetTestInput
    output: GetTestOutput
}

@input
structure GetTestInput {
    @httpQuery("input")
    input: String
}

@output
structure GetTestOutput {
    output: String
}

Possible Solution

No response

Context

No response

Smithy-Kotlin version

v1.4.23

Platform (JVM/JS/Native)

JVM

Operating system and version

MacOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.needs-triageThis issue or PR still needs to be triaged.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions