Skip to content

How to interpret bodyRoot nested path/query/header/key properties? #6246

Closed
@MaryGao

Description

@MaryGao

This is a side issue when we ask the interpretion of Azure template and I found when handling the path and other parameters there exists in-consistancy for openapi emtters. I'd like to confirm if this is an issue or by design.

playground

op create(
  @bodyRoot
  body: Cluster,
): Cluster;

model Cluster {
  @path
  pathParam: string;

  @header
  headerParam: string;

  @query
  queryParam: string;

  @key
  idKey: string;

  prop: string;
}

The current interpretion are as followings:

Request Response
Path request path response body property
Query request path response body property
Header request header response header with same name
Key request body property response body property

Here are the questions:

  • Both path and query property would be a normal response body property, is this expected?
  • Can we differentiate request header and output header?
  • Does @key property indicate read-only information and only for response body?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions