Skip to content

Redefine Method, StatusCode from http_types in typespec#2331

Merged
heaths merged 4 commits intoAzure:mainfrom
heaths:issue1644
Mar 14, 2025
Merged

Redefine Method, StatusCode from http_types in typespec#2331
heaths merged 4 commits intoAzure:mainfrom
heaths:issue1644

Conversation

@heaths
Copy link
Member

@heaths heaths commented Mar 13, 2025

Resolves #1644 and replaces #2233. The latter PR was a good attempt but we decided internally we don't want to take a dependency on a different crate - http ; though, we do have a transitive dependency on it already - for something so simple.

This starts as a copy from http_types with appropriate attribution. We may want to remove a bunch of Methods we don't need, though, at some point.

Resolves Azure#1644 and replaces Azure#2233. The latter PR was a good attempt but we decided internally we don't want to take a dependency on a different crate - `http` ; though, we do have a transitive dependency on it already - for something so simple.

This starts as a copy from http_types with appropriate attribution. We may want to remove a bunch of Methods we don't need, though, at some point.
LarryOsterman
LarryOsterman previously approved these changes Mar 14, 2025
@heaths heaths dismissed LarryOsterman’s stale review March 14, 2025 16:34

I don't think this is the right course of action for Method. It's a request-only model so I don't think we need to make it an extensible enum which, because String doesn't implement Copy, means we have to clone() it everywhere.

I want to discuss this more.

@heaths heaths merged commit 811cb15 into Azure:main Mar 14, 2025
18 checks passed
@heaths heaths deleted the issue1644 branch March 14, 2025 22:38
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.

Consider replacing http-types crate with http crate

2 participants