Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/typespec-rust/.scripts/tspcompile.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const httpSpecsGroup = {
'spector_mediatype': {input: 'payload/media-type'},
//'spector_multipart': {input: 'payload/multipart'},
'spector_xml': {input: 'payload/xml'},
'spector_routes': {input: 'routes'},
//'spector_routes': {input: 'routes'}, TODO: https://github.com/Azure/typespec-rust/issues/1020
'spector_jsonencodedname': {input: 'serialization/encoded-name/json'},
'spector_noendpoint': {input: 'server/endpoint/not-defined'},
'spector_multiple': {input: 'server/path/multiple'},
Expand Down
51 changes: 28 additions & 23 deletions packages/typespec-rust/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@
"homepage": "https://github.com/Azure/typespec-rust#readme",
"readme": "https://github.com/Azure/typespec-rust/blob/main/readme.md",
"devDependencies": {
"@azure-tools/azure-http-specs": "0.1.0-alpha.42",
"@azure-tools/typespec-azure-core": "~0.69.0",
"@azure-tools/typespec-azure-resource-manager": "~0.69.0",
"@azure-tools/typespec-azure-rulesets": "~0.69.0",
"@azure-tools/azure-http-specs": "0.1.0-alpha.43",
"@azure-tools/typespec-azure-core": "~0.70.0",
"@azure-tools/typespec-azure-resource-manager": "~0.70.0",
"@azure-tools/typespec-azure-rulesets": "~0.70.0",
"@eslint/js": "^10.0.1",
"@types/node": "^22.15.0",
"@types/turndown": "^5.0.6",
"@typespec/http-specs": "0.1.0-alpha.38",
"@typespec/spector": "0.1.0-alpha.25",
"@typespec/http-specs": "0.1.0-alpha.39",
"@typespec/spector": "0.1.0-alpha.27",
"@vitest/coverage-v8": "^4.1.5",
"@vitest/ui": "^4.1.5",
"eslint": "^10.2.1",
Expand All @@ -66,28 +66,33 @@
"vitest": "^4.1.5"
},
"peerDependencies": {
"@azure-tools/typespec-autorest": "~0.69.0",
"@azure-tools/typespec-azure-core": "~0.69.0",
"@azure-tools/typespec-azure-resource-manager": "~0.69.2",
"@azure-tools/typespec-azure-rulesets": "~0.69.2",
"@azure-tools/typespec-client-generator-core": "~0.69.2",
"@typespec/compiler": "~1.13.0",
"@typespec/events": "~0.83.0",
"@typespec/http": "~1.13.0",
"@typespec/openapi": "~1.13.0",
"@typespec/rest": "~0.83.0",
"@typespec/sse": "~0.83.0",
"@typespec/streams": "~0.83.0",
"@typespec/versioning": "~0.83.0",
"@typespec/xml": "~0.83.0"
"@azure-tools/typespec-autorest": "~0.70.0",
"@azure-tools/typespec-azure-core": "~0.70.0",
"@azure-tools/typespec-azure-resource-manager": "~0.70.0",
"@azure-tools/typespec-azure-rulesets": "~0.70.0",
"@azure-tools/typespec-client-generator-core": "~0.70.0",
"@typespec/compiler": "~1.14.0",
"@typespec/events": "~0.84.0",
"@typespec/http": "~1.14.0",
Comment thread
jhendrixMSFT marked this conversation as resolved.
"@typespec/openapi": "~1.14.0",
"@typespec/rest": "~0.84.0",
"@typespec/sse": "~0.84.0",
"@typespec/streams": "~0.84.0",
"@typespec/versioning": "~0.84.0",
"@typespec/xml": "~0.84.0"
},
"dependencies": {
"@azure-tools/typespec-client-generator-core": "~0.69.2",
"@typespec/compiler": "~1.13.0",
"@typespec/http": "~1.13.0",
"@azure-tools/typespec-client-generator-core": "~0.70.0",
"@typespec/compiler": "~1.14.0",
"@typespec/http": "~1.14.0",
Comment thread
jhendrixMSFT marked this conversation as resolved.
"linkifyjs": "^4.3.2",
"query-string": "^9.4.1",
"source-map-support": "^0.5.21",
"turndown": "^7.2.4"
},
"pnpm": {
"overrides": {
"prettier": "3.9.5"
}
}
}
1,660 changes: 555 additions & 1,105 deletions packages/typespec-rust/pnpm-lock.yaml

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// Licensed under the MIT License. See License.txt in the project root for license information.

use spector_duration::DurationClient;

#[tokio::test]
async fn int_milliseconds() {
let client = DurationClient::with_no_credential("http://localhost:3000", None).unwrap();
client
.get_duration_lossy_client()
.int_milliseconds(36250, None)
.await
.unwrap();
}

#[tokio::test]
async fn int_seconds() {
let client = DurationClient::with_no_credential("http://localhost:3000", None).unwrap();
client
.get_duration_lossy_client()
.int_seconds(36, None)
.await
.unwrap();
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ async fn special_char_subclient_inherits_endpoint() {
assert_eq!(subclient.endpoint().as_str(), "http://localhost:3000/");
}

// The upstream http-specs `mockapi.ts` registers the route as
// `/parameters/query/special-char/dollar-sign` (kebab-case) while the tsp
// (and therefore the generated client) uses `@route("/dollarSign")`
// (camelCase). The spector mock server returns 404 until that mismatch is
// fixed upstream, so this live test is ignored for now.
#[ignore = "upstream http-specs path mismatch: dollarSign vs dollar-sign"]
#[tokio::test]
async fn dollar_sign_returns_204() {
let client = QueryClient::with_no_credential("http://localhost:3000", None).unwrap();
Expand Down