Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Feb 9, 2026

Adds test coverage for XML payloads containing models with enum properties to packages/http-specs/specs/payload/xml.

Changes

  • New model type: ModelWithEnum with single status property of extensible union type
  • Enum definition: Status union with "pending", "success", "error" variants
  • Operations: GET/PUT endpoints at /payload/xml/modelWithEnum
  • Mock API: Scenario handlers for both operations with "success" status value

Example payload

<ModelWithEnum>
  <status>success</status>
</ModelWithEnum>

The extensible union allows any string value beyond the defined variants, following TypeSpec's standard enum pattern.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • telemetry.astro.build
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/typespec/typespec/website/node_modules/.bin/../astro/astro.js build node s/.b�� tput-dir ../../website/src/conte--llmstxt node /.bin/sh --no-emit tsconfig.build.j/home/REDACTED/work/typespec/typespec/packages/http-specs/node_modules�� st/node-gyp-bin/generate-scenarios-summary sh -c lmstxt --output-dir ../../websit--output-dir sh (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>[specs] New test case for XML model with enum property</issue_title>
<issue_description>We need a new test case in https://github.com/microsoft/typespec/blob/main/packages/http-specs/specs/payload/xml/main.tsp to cover the scenario of an XML payload that is a model with a single property defined as an enum.
A possible example payload could look like:

<ModelWithEnum>
    <status>success</status>
</ModelWithEnum>

Where "status" is an extensible union with the following values: "pending", "success", "error".
The scenario should support both GET and PUT operations.

NOTE:

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: annatisch <8689453+annatisch@users.noreply.github.com>
@microsoft-github-policy-service microsoft-github-policy-service bot added the lib:http-specs For issues/prs related to the @typespec/http-specs package label Feb 9, 2026
Co-authored-by: annatisch <8689453+annatisch@users.noreply.github.com>
Copilot AI changed the title [WIP] Add new test case for XML model with enum property Add XML model with enum property test case Feb 9, 2026
Copilot AI requested a review from annatisch February 9, 2026 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[specs] New test case for XML model with enum property

2 participants