Azure / Azure/typespec-rust

Azure Confidential Ledger TSP causes RUST emitter to fail

Open
#695 4 comments 0 reactions 1 assignee Claimed by @heaths View on GitHub
CodeGen design-discussion
Dominant language
Rust
Stars
7
Forks
11
Avg merge
2d 5h
Merged PRs (30d)
5

Description

https://github.com/Azure/azure-rest-api-specs/blob/dbdbc75c548071c0f5f0bdfae18dd1b31a7ab95a/specification/confidentialledger/Microsoft.CodeTransparency/main.tsp#L473

The problem appears to be related to the `content-type` header when handling errors - the rust emitter believes that there are conflicting `content-type` headers requested on errors.

```
Q:/src/azure-sdk-for-rust/sdk/confidentialledger/{namespace}/TempTypeSpecFiles/Microsoft.CodeTransparency/main.tsp:41:4 - error @azure-tools/typespec-rust/InternalError: The emitter encountered an internal error during preprocessing. Please open an issue at https://github.com/Azure/typespec-rust/issues and include the complete error message.
method getTransparencyConfigCbor has conflicting content types
Error: method getTransparencyConfigCbor has conflicting content types
at getResponseFormat (file:///Q:/src/azure-sdk-for-rust/sdk/confidentialledger/%7Bnamespace%7D/TempTypeSpecFiles/node_modules/@azure-tools/typespec-rust/dist/src/tcgcadapter/adapter.js:1312:27)
at Adapter.adaptMethod (file:///Q:/src/azure-sdk-for-rust/sdk/confidentialledger/%7Bnamespace%7D/TempTypeSpecFiles/node_modules/@azure-tools/typespec-rust/dist/src/tcgcadapter/adapter.js:1366:32)
at Adapter.recursiveAdaptClient (file:///Q:/src/azure-sdk-for-rust/sdk/confidentialledger/%7Bnamespace%7D/TempTypeSpecFiles/node_modules/@azure-tools/typespec-rust/dist/src/tcgcadapter/adapter.js:1019:18)
at Adapter.adaptClients (file:///Q:/src/azure-sdk-for-rust/sdk/confidentialledger/%7Bnamespace%7D/TempTypeSpecFiles/node_modules/@azure-tools/typespec-rust/dist/src/tcgcadapter/adapter.js:786:22)
at Adapter.tcgcToCrate (file:///Q:/src/azure-sdk-for-rust/sdk/confidentialledger/%7Bnamespace%7D/TempTypeSpecFiles/node_modules/@azure-tools/typespec-rust/dist/src/tcgcadapter/adapter.js:76:14)
```

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.