microsoft / microsoft/typespec

[specs] add test for nested paging in xml

Open
#7,797 0 comments 1 reaction 1 assignee Assigned to @Copilot View on GitHub
lib:http-specs
Dominant language
Java
Stars
5.9k
Forks
394
Avg merge
1d 23h
Merged PRs (30d)
104

Description

Please add a test for a scenario like this

```tsp
@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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.