Skip to content

Add starting test structure#34

Merged
mauriciogardini merged 12 commits intofeature/ef-pythonfrom
feature/add-values
Jul 31, 2025
Merged

Add starting test structure#34
mauriciogardini merged 12 commits intofeature/ef-pythonfrom
feature/add-values

Conversation

@mauriciogardini
Copy link

@mauriciogardini mauriciogardini commented Jul 30, 2025

Add starting test structure for the rest of the development.

In general, use getProgram() to input TypeSpec code, so it can be asserted against the generated Python code.

@mauriciogardini mauriciogardini changed the title Add Atom Add starting test structure Jul 31, 2025
@mauriciogardini mauriciogardini marked this pull request as ready for review July 31, 2025 17:58
@mauriciogardini mauriciogardini merged commit dea3541 into feature/ef-python Jul 31, 2025
steverice pushed a commit that referenced this pull request Sep 26, 2025
* Add Atom

* Add initial test structure

* Add Atom

* Add initial test structure

* Add file to index

* Add python scaffolding

* Add Atom

* Add initial test structure

* Add file to index

* pnpm format

---------

Co-authored-by: swatikumar <swatikumar@pinterest.com>
mauriciogardini added a commit that referenced this pull request Nov 10, 2025
* Add alloy-js/python dependency

* Add python scaffolding

* Add starting test structure (#34)

* Add Atom

* Add initial test structure

* Add Atom

* Add initial test structure

* Add file to index

* Add python scaffolding

* Add Atom

* Add initial test structure

* Add file to index

* pnpm format

---------

Co-authored-by: swatikumar <swatikumar@pinterest.com>

* Add Atom (#36)

* Add Atom

* Fix

* Add typing (#38)

* Add Atom

* Add typing

* Fix

* Fix

* Add typing

* Fix

* Fix comment

* Add TODOs

* Unify test utils (#42)

* Add Atom

* Add typing

* Fix

* Fix

* Add typing

* Fix

* Unify test utils

* pnpm format

* Remove exports

* Fix comment

* Add TODOs

* Add models and interfaces

* Remove file

* Changes

* Missing files

* Add Literal import

* Accounting for feedback

* Handle floats in a better way

* Accounting for feedback

* Fix

* Update

* Rebase

* Fix tests

* Fix

* Add comments

* Remove typing module import

* Fix

* Fix

* Fix

* Changing docstrings

---------

Co-authored-by: swatikumar <swatikumar@pinterest.com>
Co-authored-by: Swati Kumar <swati.kumar.a@gmail.com>
mauriciogardini added a commit that referenced this pull request Nov 10, 2025
* Add Atom

* Add initial test structure

* Add Atom

* Add initial test structure

* Add file to index

* Add python scaffolding

* Add Atom

* Add initial test structure

* Add file to index

* pnpm format

---------

Co-authored-by: swatikumar <swatikumar@pinterest.com>
mauriciogardini added a commit that referenced this pull request Dec 15, 2025
* Add Atom

* Add initial test structure

* Add Atom

* Add initial test structure

* Add file to index

* Add python scaffolding

* Add Atom

* Add initial test structure

* Add file to index

* pnpm format

---------

Co-authored-by: swatikumar <swatikumar@pinterest.com>
mauriciogardini added a commit that referenced this pull request Dec 15, 2025
* Add Atom

* Add initial test structure

* Add Atom

* Add initial test structure

* Add file to index

* Add python scaffolding

* Add Atom

* Add initial test structure

* Add file to index

* pnpm format

---------

Co-authored-by: swatikumar <swatikumar@pinterest.com>
mauriciogardini added a commit that referenced this pull request Dec 15, 2025
* Add alloy-js/python dependency

* Add python scaffolding

* Add starting test structure (#34)

* Add Atom

* Add initial test structure

* Add Atom

* Add initial test structure

* Add file to index

* Add python scaffolding

* Add Atom

* Add initial test structure

* Add file to index

* pnpm format

---------

Co-authored-by: swatikumar <swatikumar@pinterest.com>

* Add Atom (#36)

* Add Atom

* Fix

* Add typing (#38)

* Add Atom

* Add typing

* Fix

* Fix

* Add typing

* Fix

* Fix comment

* Add TODOs

* Unify test utils (#42)

* Add Atom

* Add typing

* Fix

* Fix

* Add typing

* Fix

* Unify test utils

* pnpm format

* Remove exports

* Fix comment

* Add TODOs

* Add models and interfaces

* Remove file

* Changes

* Missing files

* Add Literal import

* Accounting for feedback

* Handle floats in a better way

* Accounting for feedback

* Fix

* Update

* Rebase

* Fix tests

* Fix

* Add comments

* Remove typing module import

* Fix

* Fix

* Fix

* Changing docstrings

---------

Co-authored-by: swatikumar <swatikumar@pinterest.com>
Co-authored-by: Swati Kumar <swati.kumar.a@gmail.com>
mauriciogardini added a commit that referenced this pull request Dec 18, 2025
* Add Atom

* Add initial test structure

* Add Atom

* Add initial test structure

* Add file to index

* Add python scaffolding

* Add Atom

* Add initial test structure

* Add file to index

* pnpm format

---------

Co-authored-by: swatikumar <swatikumar@pinterest.com>
mauriciogardini added a commit that referenced this pull request Dec 18, 2025
* Add Atom

* Add initial test structure

* Add Atom

* Add initial test structure

* Add file to index

* Add python scaffolding

* Add Atom

* Add initial test structure

* Add file to index

* pnpm format

---------

Co-authored-by: swatikumar <swatikumar@pinterest.com>
mauriciogardini added a commit that referenced this pull request Dec 18, 2025
* Add alloy-js/python dependency

* Add python scaffolding

* Add starting test structure (#34)

* Add Atom

* Add initial test structure

* Add Atom

* Add initial test structure

* Add file to index

* Add python scaffolding

* Add Atom

* Add initial test structure

* Add file to index

* pnpm format

---------

Co-authored-by: swatikumar <swatikumar@pinterest.com>

* Add Atom (#36)

* Add Atom

* Fix

* Add typing (#38)

* Add Atom

* Add typing

* Fix

* Fix

* Add typing

* Fix

* Fix comment

* Add TODOs

* Unify test utils (#42)

* Add Atom

* Add typing

* Fix

* Fix

* Add typing

* Fix

* Unify test utils

* pnpm format

* Remove exports

* Fix comment

* Add TODOs

* Add models and interfaces

* Remove file

* Changes

* Missing files

* Add Literal import

* Accounting for feedback

* Handle floats in a better way

* Accounting for feedback

* Fix

* Update

* Rebase

* Fix tests

* Fix

* Add comments

* Remove typing module import

* Fix

* Fix

* Fix

* Changing docstrings

---------

Co-authored-by: swatikumar <swatikumar@pinterest.com>
Co-authored-by: Swati Kumar <swati.kumar.a@gmail.com>
mauriciogardini added a commit that referenced this pull request Dec 19, 2025
* Add Atom

* Add initial test structure

* Add Atom

* Add initial test structure

* Add file to index

* Add python scaffolding

* Add Atom

* Add initial test structure

* Add file to index

* pnpm format

---------

Co-authored-by: swatikumar <swatikumar@pinterest.com>
mauriciogardini added a commit that referenced this pull request Dec 19, 2025
* Add Atom

* Add initial test structure

* Add Atom

* Add initial test structure

* Add file to index

* Add python scaffolding

* Add Atom

* Add initial test structure

* Add file to index

* pnpm format

---------

Co-authored-by: swatikumar <swatikumar@pinterest.com>
mauriciogardini added a commit that referenced this pull request Dec 19, 2025
* Add alloy-js/python dependency

* Add python scaffolding

* Add starting test structure (#34)

* Add Atom

* Add initial test structure

* Add Atom

* Add initial test structure

* Add file to index

* Add python scaffolding

* Add Atom

* Add initial test structure

* Add file to index

* pnpm format

---------

Co-authored-by: swatikumar <swatikumar@pinterest.com>

* Add Atom (#36)

* Add Atom

* Fix

* Add typing (#38)

* Add Atom

* Add typing

* Fix

* Fix

* Add typing

* Fix

* Fix comment

* Add TODOs

* Unify test utils (#42)

* Add Atom

* Add typing

* Fix

* Fix

* Add typing

* Fix

* Unify test utils

* pnpm format

* Remove exports

* Fix comment

* Add TODOs

* Add models and interfaces

* Remove file

* Changes

* Missing files

* Add Literal import

* Accounting for feedback

* Handle floats in a better way

* Accounting for feedback

* Fix

* Update

* Rebase

* Fix tests

* Fix

* Add comments

* Remove typing module import

* Fix

* Fix

* Fix

* Changing docstrings

---------

Co-authored-by: swatikumar <swatikumar@pinterest.com>
Co-authored-by: Swati Kumar <swati.kumar.a@gmail.com>
steverice pushed a commit that referenced this pull request Feb 17, 2026
…icrosoft#9570)

`XmlErrorValue.get()` returned `SimpleModel` without a content-type
header (defaulting to `application/json`) while `XmlError` used
`application/xml`. This inconsistency is unexpected for an XML payload
spec.

### Changes
- Wrap `SimpleModel` response with explicit `application/xml`
content-type header to match the error response

**Before:**
```tsp
get(): SimpleModel | XmlError;
```

**After:**
```tsp
get(): {
  @Header("content-type") contentType: "application/xml";
  @Body body: SimpleModel;
} | XmlError;
```

This follows the same pattern used by `XmlOperations<TModel>` template
elsewhere in the file.

> [!WARNING]
>
> <details>
> <summary>Firewall rules blocked me from connecting to one or more
addresses (expand for details)</summary>
>
> #### 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 sion��
ebsite/src/content/docs/docs/emitters/openapi3/reference node e
--no-emit sh rsioning/referentspd doc . --enable-experimental
--output-dir ../../website/src/content/docs/d--output-dir node p/no��
ite...&#34; --filter &#34;!@typespec/monorepo&#34; run regen-docs uname
/node_modules/.bin/node &amp;&amp; pnpm lint-tysh node
_modules/pnpm/ditsx ./.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:
>
> - Configure [Actions setup
steps](https://gh.io/copilot/actions-setup-steps) to set up my
environment, which run before the firewall is enabled
> - Add the appropriate URLs or hosts to the custom allowlist in this
repository's [Copilot coding agent
settings](https://github.com/microsoft/typespec/settings/copilot/coding_agent)
(admins only)
>
> </details>

<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>

> 
> ----
> 
> *This section details on the original issue you should resolve*
> 
> <issue_title>[spector] fix case for payload/xml</issue_title>
> <issue_description>For
https://github.com/microsoft/typespec/blob/afa236acbbaa468a8910e8fc4177828ed174d8ba/packages/http-specs/specs/payload/xml/main.tsp#L332,
> - `SimpleModel` is not wrapped with content-type header
"application/xml" then its default content-type is "application/json"
> - `XmlError` defines content-type header as "application/xml"
> 
> It is very strange that response and error response has such different
content-type.
> 
> **Expected behavor**:
> 
> We expect `SimpleModel` shall also be wrapped with content-type
"application/xml" to keep consistent with error response like other
cases in this file
> 
> **NOTE**:
> 
> 1. DO add changelog under .chronus/changes
> 2. DO necessary check before commit.</issue_description>
> 
> ## Comments on the Issue (you are @copilot in this section)
> 
> <comments>
> </comments>
> 


</details>



<!-- START COPILOT CODING AGENT SUFFIX -->

- Fixes microsoft#9569

<!-- START COPILOT CODING AGENT TIPS -->
---

💡 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](https://gh.io/copilot-coding-agent-tips) in the docs.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant