Skip to content

[specs] add test for nested paging in xml #7797

@catalinaperalta

Description

@catalinaperalta

Please add a test for a scenario like this

@service
namespace Test;


/** The blob flat list segment. */
model BlobFlatListSegment {
  /** The blob items. */
  @pageItems
  @Xml.name("Blob")
  @Xml.unwrapped
  blobItems: string[];
}

/** An enumeration of blobs. */
@Xml.name("EnumerationResults")
model ListBlobsFlatSegmentResponse {
  /** The container name. */
  @Xml.attribute
  @Xml.name("ContainerName")
  containerName: string;

  /** The blob segment. */
  @Xml.name("Blobs")
  segment: BlobFlatListSegment;

  /** The next marker of the blobs. */
  @continuationToken
  @Xml.name("NextMarker")
  nextMarker?: string;
}

@list
@route("test")
op listBlobFlatSegment(
  @continuationToken
  @query
  marker?: string;
): {
        /** The list of blobs */
        @body
        enumerationResults: ListBlobsFlatSegmentResponse;
}

You can choose clearer names and test more scenarios

Metadata

Metadata

Assignees

Labels

lib:http-specsFor issues/prs related to the @typespec/http-specs package

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions