⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 12, 2026

Adding ArrayEncoding test case with enum

  • Add Color enum definition to main.tsp
  • Add PipeDelimitedArrayEnumElementProperty model with enum array
  • Add pipeDelimitedEnumElement operation with proper scenario documentation
  • Update mockapi.ts to add server-side test for the new enum scenario
  • Run build and tests to validate changes
  • Verify all scenarios and mock APIs are valid
  • Convert Color from enum to extensible union per review feedback
  • Update documentation to correctly reference extensible union
  • Add changelog entry using pnpm change add
  • Run pnpm format to ensure code formatting is correct
Original prompt

This section details on the original issue you should resolve

<issue_title>http-specs, add test case for ArrayEncoding with enum</issue_title>
<issue_description>Add a new test case op pipeDelimitedEnumElement(@body body: PipeDelimitedArrayEnumElementProperty): PipeDelimitedArrayEnumElementProperty;) to https://github.com/microsoft/typespec/blob/main/packages/http-specs/specs/encode/array/main.tsp

The scenario on wire would be same as pipeDelimited.

Just the type be e.g.

model PipeDelimitedArrayEnumElementProperty {
  @encode(ArrayEncoding.pipeDelimited)
  value: Color[];
}
```</issue_description>

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

<comments>
</comments>


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Add test case for ArrayEncoding with enum Add pipe-delimited enum array test case to encode/array spec Jan 12, 2026
@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 12, 2026

Open in StackBlitz

npm i https://pkg.pr.new/microsoft/typespec/@typespec/http@9330
npm i https://pkg.pr.new/microsoft/typespec/@typespec/http-specs@9330

commit: 36029ef

@weidongxu-microsoft
Copy link
Contributor

@copilot

Please add changelog
pnpm change add

Copy link
Contributor Author

Copilot AI commented Jan 12, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

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: /usr/local/bin/node node /home/REDACTED/work/typespec/typespec/website/node_modules/.bin/../astro/astro.js build sh nts/�� ebsite/src/content/docs/docs/emitters/openapi3/reference node (dns block)

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

Copilot AI changed the title Add pipe-delimited enum array test case to encode/array spec Add pipe-delimited extensible union array test case to encode/array spec Jan 12, 2026
Copy link
Contributor Author

Copilot AI commented Jan 12, 2026

@copilot

Please add changelog
...

Added changelog entry in commit aab8d3a.

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: /usr/local/bin/node node /home/REDACTED/work/typespec/typespec/website/node_modules/.bin/../astro/astro.js build node nts/�� ebsite/src/content/docs/docs/emitters/openapi3/reference . node_modules/@npmcli/run-script/../../website/src/content/docs/docs/emitters/protobuf/reference --import @typespec/librar-c ents/reference sh -c astro check --minimumFailingSeverity hint &amp;&amp; ast--filter node .0_tmp_3357/node_modules/pnpm/dist/node-gyp-bin/node -p . &amp;&amp; pnpm lish node /snap/bin/sh node (dns block)

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

@weidongxu-microsoft
Copy link
Contributor

weidongxu-microsoft commented Jan 12, 2026

@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 Jan 12, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 12, 2026

All changed packages have been documented.

  • @typespec/http-specs
Show changes

@typespec/http-specs - feature ✏️

Add test case for ArrayEncoding with extensible union

Copy link
Contributor Author

Copilot AI commented Jan 12, 2026

@copilot

run pnpm format
...

Format has been applied (commit bf398ef). All validation checks pass:

  • ✅ pnpm build
  • ✅ pnpm validate-mock-apis
  • ✅ pnpm regen-docs

The implementation follows the testserver-generation.md guidelines.

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: /usr/local/bin/node node /home/REDACTED/work/typespec/typespec/website/node_modules/.bin/../astro/astro.js build sh cal/�� ebsite/src/content/docs/docs/emitters/openapi3/reference sed pec/node_modules/.bin/node warn-as-error --sh sh /bin/esbuild node p/no�� validate-scenarios /bin/esbuild .0_tmp_3350/node_modules/pnpm/dist/node-gyp-bin/node /library-linter sh node tools/pnpm/10.23tsx ./.scripts/regen-compiler-docs.ts tp/reference (dns block)

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

@tadelesh
Copy link
Member

Replaced with #9390.

@tadelesh tadelesh closed this Jan 15, 2026
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.

http-specs, add test case for ArrayEncoding with enum

5 participants