Skip to content

[sample gen] Sample client method contentType parameter is missing #3595

@v-jiaodi

Description

@v-jiaodi

spec link: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/appconfiguration/data-plane/AppConfiguration

Image

typespec:

@doc("A key-value model.")
model KeyValue {
  key?: string;
  value?: string;
}

@doc("Put key-value operation")
@route("/kv/{key}")
@put
op putKeyValue(
  @doc("The key parameter")
  @path
  key: string,
  
  #suppress "@azure-tools/typespec-client-generator-core/no-unnamed-types" "Maintaining compatibility"
  #suppress "@azure-tools/typespec-azure-core/no-closed-literal-union" "Maintaining compatibility"
  @doc("Content-Type header")
  @header("Content-Type")
  contentType:
    | "application/vnd.microsoft.appconfig.kv+json"
    | "application/vnd.microsoft.appconfig.kvset+json"
    | "application/json"
    | "text/json"
    | "application/*+json"
    | "application/json-patch+json",
  
  @doc("The key-value to create.")
  @body
  entity?: KeyValue,
): {
  @statusCode statusCode: 200;
  @body body: KeyValue;
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions