diff --git a/.chronus/changes/ParameterObjectMissing-2024-10-8-14-57-38.md b/.chronus/changes/ParameterObjectMissing-2024-10-8-14-57-38.md deleted file mode 100644 index 88ae53a89e..0000000000 --- a/.chronus/changes/ParameterObjectMissing-2024-10-8-14-57-38.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -changeKind: feature -packages: - - "@typespec/openapi3" ---- - -Add support for `#deprecated` for OpenAPI3Parameter \ No newline at end of file diff --git a/.chronus/changes/ReleaseDashboardsStep1-2024-11-5-14-40-39.md b/.chronus/changes/ReleaseDashboardsStep1-2024-11-5-14-40-39.md deleted file mode 100644 index e3e74262ca..0000000000 --- a/.chronus/changes/ReleaseDashboardsStep1-2024-11-5-14-40-39.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -changeKind: internal -packages: - - "@typespec/http-specs" - - "@typespec/spector" ---- - -Adding scripts to package.json \ No newline at end of file diff --git a/.chronus/changes/ReleaseHttpSpecsAlpha4-2024-11-8-23-14-16.md b/.chronus/changes/ReleaseHttpSpecsAlpha4-2024-11-8-23-14-16.md deleted file mode 100644 index 3cc09f4932..0000000000 --- a/.chronus/changes/ReleaseHttpSpecsAlpha4-2024-11-8-23-14-16.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -changeKind: internal -packages: - - "@typespec/http-specs" ---- - -Modifies Spec Scenarios \ No newline at end of file diff --git a/.chronus/changes/SpecDashBoard-2024-10-13-22-23-40.md b/.chronus/changes/SpecDashBoard-2024-10-13-22-23-40.md deleted file mode 100644 index 2100dd2b2a..0000000000 --- a/.chronus/changes/SpecDashBoard-2024-10-13-22-23-40.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -changeKind: internal -packages: - - "@typespec/spec-coverage-sdk" - - "@typespec/spector" ---- - -Modify code to be handled in spec-dashboard \ No newline at end of file diff --git a/.chronus/changes/SpecsAlpha2-2024-10-26-15-58-19.md b/.chronus/changes/SpecsAlpha2-2024-10-26-15-58-19.md deleted file mode 100644 index 25bb9f084c..0000000000 --- a/.chronus/changes/SpecsAlpha2-2024-10-26-15-58-19.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -changeKind: internal -packages: - - "@typespec/http-specs" ---- - -Change Key Values in spec file \ No newline at end of file diff --git a/.chronus/changes/TagMetadataDoc-2024-10-6-14-53-10.md b/.chronus/changes/TagMetadataDoc-2024-10-6-14-53-10.md deleted file mode 100644 index b79f53e1a4..0000000000 --- a/.chronus/changes/TagMetadataDoc-2024-10-6-14-53-10.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -changeKind: internal -packages: - - "@typespec/openapi" ---- - -Update Docs for `@tagMetadata` \ No newline at end of file diff --git a/.chronus/changes/azhang_ValidatePatternRegEx-2024-11-3-11-32-36.md b/.chronus/changes/azhang_ValidatePatternRegEx-2024-11-3-11-32-36.md deleted file mode 100644 index 28de1e3a7d..0000000000 --- a/.chronus/changes/azhang_ValidatePatternRegEx-2024-11-3-11-32-36.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -changeKind: fix -packages: - - "@typespec/compiler" ---- - -Added RegEx validation for @pattern and will throw warning for invalid RegEx string \ No newline at end of file diff --git a/.chronus/changes/checkAvailableTypeName-2024-10-7-15-22-31.md b/.chronus/changes/checkAvailableTypeName-2024-10-7-15-22-31.md deleted file mode 100644 index ca3ef47771..0000000000 --- a/.chronus/changes/checkAvailableTypeName-2024-10-7-15-22-31.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -changeKind: fix -packages: - - "@typespec/openapi3" ---- - -Illegal characters in component keys diff --git a/.chronus/changes/compiler-trace-in-vscode-2024-11-10-12-32-36.md b/.chronus/changes/compiler-trace-in-vscode-2024-11-10-12-32-36.md new file mode 100644 index 0000000000..a02b59edf1 --- /dev/null +++ b/.chronus/changes/compiler-trace-in-vscode-2024-11-10-12-32-36.md @@ -0,0 +1,7 @@ +--- +changeKind: feature +packages: + - "@typespec/compiler" +--- + +Compiler trace will be sent to IDE as trace log through language server \ No newline at end of file diff --git a/.chronus/changes/dep-update-2024-11-2-2024-10-20-22-1-27.md b/.chronus/changes/dep-update-2024-11-2-2024-10-20-22-1-27.md deleted file mode 100644 index ae1be1b82e..0000000000 --- a/.chronus/changes/dep-update-2024-11-2-2024-10-20-22-1-27.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -changeKind: internal -packages: - - "@typespec/bundler" - - "@typespec/compiler" - - "@typespec/eslint-plugin" - - "@typespec/events" - - "@typespec/html-program-viewer" - - "@typespec/http-server-csharp" - - "@typespec/http-server-javascript" - - "@typespec/http-specs" - - "@typespec/http" - - "@typespec/internal-build-utils" - - "@typespec/json-schema" - - "@typespec/library-linter" - - "@typespec/openapi" - - "@typespec/openapi3" - - "@typespec/playground" - - "@typespec/prettier-plugin-typespec" - - "@typespec/protobuf" - - "@typespec/rest" - - "@typespec/spec-api" - - "@typespec/spec-coverage-sdk" - - "@typespec/spector" - - "@typespec/sse" - - "@typespec/streams" - - tmlanguage-generator - - typespec-vscode - - "@typespec/versioning" - - "@typespec/xml" ---- - -update dev deps \ No newline at end of file diff --git a/.chronus/changes/docs-directives-2024-10-7-18-13-59.md b/.chronus/changes/docs-directives-2024-10-7-18-13-59.md deleted file mode 100644 index 57aaaf2b18..0000000000 --- a/.chronus/changes/docs-directives-2024-10-7-18-13-59.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -# Change versionKind to one of: internal, fix, dependencies, feature, deprecation, breaking -changeKind: internal -packages: - - "@typespec/compiler" ---- diff --git a/.chronus/changes/feature-mutate-namespaces-cascade-2024-9-31-21-41-8.md b/.chronus/changes/feature-mutate-namespaces-cascade-2024-9-31-21-41-8.md deleted file mode 100644 index 8333e554f5..0000000000 --- a/.chronus/changes/feature-mutate-namespaces-cascade-2024-9-31-21-41-8.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -changeKind: feature -packages: - - "@typespec/compiler" ---- - -Add mutateSubgraphWithNamespace as a separate API diff --git a/.chronus/changes/fix-js-source-file-docs-2024-12-06-22-57-43.md b/.chronus/changes/fix-js-source-file-docs-2024-12-06-22-57-43.md deleted file mode 100644 index b7152c7566..0000000000 --- a/.chronus/changes/fix-js-source-file-docs-2024-12-06-22-57-43.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -changeKind: internal -packages: - - "@typespec/compiler" ---- - -Fixes incorrect default value in dev doc diff --git a/.chronus/changes/fix-json-schema-union-crash-2024-10-25-12-38-51.md b/.chronus/changes/fix-json-schema-union-crash-2024-10-25-12-38-51.md deleted file mode 100644 index 9239921e6e..0000000000 --- a/.chronus/changes/fix-json-schema-union-crash-2024-10-25-12-38-51.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -changeKind: fix -packages: - - "@typespec/json-schema" ---- - -Fixes crash that occurred when a template instantiation's template argument was a union that references a declaration. diff --git a/.chronus/changes/fix-ns-2024-10-18-4-22-4.md b/.chronus/changes/fix-ns-2024-10-18-4-22-4.md deleted file mode 100644 index 6596e6329b..0000000000 --- a/.chronus/changes/fix-ns-2024-10-18-4-22-4.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -# Change versionKind to one of: internal, fix, dependencies, feature, deprecation, breaking -changeKind: fix -packages: - - "@typespec/http-server-csharp" ---- - -Fix #4308 Process sub-namespace of a service in csharp service emitter -Fix #4998 Generator throws on void return type -Fix #5000 Tuple types are not properly generated -Fix #5001 OkResponse is generated as a model -Fix #5024 Literal type is not properly generated -Fix #5124 Templated model reported error while generating -Fix #5125 No interfaces and controllers are generated for ops in a namespace diff --git a/.chronus/changes/fix-path-explicit-allow-reserved-2024-10-7-20-13-23.md b/.chronus/changes/fix-path-explicit-allow-reserved-2024-10-7-20-13-23.md deleted file mode 100644 index e8d36271d6..0000000000 --- a/.chronus/changes/fix-path-explicit-allow-reserved-2024-10-7-20-13-23.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -# Change versionKind to one of: internal, fix, dependencies, feature, deprecation, breaking -changeKind: fix -packages: - - "@typespec/http" ---- - -Uri template attributes were not extracted when parameter was explicitly mark with `@path` or `@query` as well diff --git a/.chronus/changes/fix-versioning-typechangeof-2024-11-3-22-56-22.md b/.chronus/changes/fix-versioning-typechangeof-2024-11-3-22-56-22.md deleted file mode 100644 index 65426bb013..0000000000 --- a/.chronus/changes/fix-versioning-typechangeof-2024-11-3-22-56-22.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -changeKind: internal -packages: - - "@typespec/versioning" ---- - diff --git a/.chronus/changes/fix-versioning-typechangeof-2024-11-3-22-56-4.md b/.chronus/changes/fix-versioning-typechangeof-2024-11-3-22-56-4.md deleted file mode 100644 index 463f4eb094..0000000000 --- a/.chronus/changes/fix-versioning-typechangeof-2024-11-3-22-56-4.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -changeKind: fix -packages: - - "@typespec/versioning" ---- - -Fixes diagnostics for @typeChangedFrom to properly detect when an incompatible version is referenced inside of a template, union, or tuple. \ No newline at end of file diff --git a/.chronus/changes/http-specs-fix-dotnet-compatibility-failure-2024-10-11-16-9-50.md b/.chronus/changes/http-specs-fix-dotnet-compatibility-failure-2024-10-11-16-9-50.md deleted file mode 100644 index 0038556198..0000000000 --- a/.chronus/changes/http-specs-fix-dotnet-compatibility-failure-2024-10-11-16-9-50.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -changeKind: fix -packages: - - "@typespec/http-specs" ---- - -Fix dotnet compatibility failure in http-specs \ No newline at end of file diff --git a/.chronus/changes/http-specs_fix-api-key-mockapi-2024-10-25-15-53-24.md b/.chronus/changes/http-specs_fix-api-key-mockapi-2024-10-25-15-53-24.md deleted file mode 100644 index 37290d5adc..0000000000 --- a/.chronus/changes/http-specs_fix-api-key-mockapi-2024-10-25-15-53-24.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -changeKind: fix -packages: - - "@typespec/http-specs" ---- - -Fix api-key mockapi \ No newline at end of file diff --git a/.chronus/changes/list_operation_test-2024-10-27-18-41-40.md b/.chronus/changes/list_operation_test-2024-10-27-18-41-40.md deleted file mode 100644 index f542056d7f..0000000000 --- a/.chronus/changes/list_operation_test-2024-10-27-18-41-40.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -changeKind: feature -packages: - - "@typespec/http-specs" ---- - -add link case of server driven pagination test \ No newline at end of file diff --git a/.chronus/changes/none_visibility-2024-10-27-17-8-46.md b/.chronus/changes/none_visibility-2024-10-27-17-8-46.md deleted file mode 100644 index 5cbe193a4a..0000000000 --- a/.chronus/changes/none_visibility-2024-10-27-17-8-46.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -changeKind: feature -packages: - - "@typespec/http-specs" ---- - -add none visibility test \ No newline at end of file diff --git a/.chronus/changes/openapi3-peer-2024-11-5-18-44-45.md b/.chronus/changes/openapi3-peer-2024-11-5-18-44-45.md deleted file mode 100644 index d6e39adaf3..0000000000 --- a/.chronus/changes/openapi3-peer-2024-11-5-18-44-45.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -changeKind: fix -packages: - - "@typespec/openapi3" ---- - -Added missing peer dependency "openapi-types" \ No newline at end of file diff --git a/.chronus/changes/peer-dependencies-2024-9-10-22-53-58.md b/.chronus/changes/peer-dependencies-2024-9-10-22-53-58.md deleted file mode 100644 index f846ae4fa1..0000000000 --- a/.chronus/changes/peer-dependencies-2024-9-10-22-53-58.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -changeKind: internal -packages: - - "@typespec/compiler" ---- - -Set `@typespec/compiler` as a `peerDependency` in library templates \ No newline at end of file diff --git a/.chronus/changes/rename-vscode-extension-typespec-2024-11-10-11-11-45.md b/.chronus/changes/rename-vscode-extension-typespec-2024-11-10-11-11-45.md new file mode 100644 index 0000000000..a6bbf5dd5e --- /dev/null +++ b/.chronus/changes/rename-vscode-extension-typespec-2024-11-10-11-11-45.md @@ -0,0 +1,7 @@ +--- +changeKind: feature +packages: + - typespec-vscode +--- + +Rename vscode extension from "TypeSpec for VS Code" to "TypeSpec" \ No newline at end of file diff --git a/.chronus/changes/nullable-2024-11-6-1-23-27.md b/.chronus/changes/show-linter-rule-url-in-codefix-2024-10-21-9-17-32.md similarity index 57% rename from .chronus/changes/nullable-2024-11-6-1-23-27.md rename to .chronus/changes/show-linter-rule-url-in-codefix-2024-10-21-9-17-32.md index 5aa6b8945c..b8effbc31c 100644 --- a/.chronus/changes/nullable-2024-11-6-1-23-27.md +++ b/.chronus/changes/show-linter-rule-url-in-codefix-2024-10-21-9-17-32.md @@ -2,7 +2,7 @@ # Change versionKind to one of: internal, fix, dependencies, feature, deprecation, breaking changeKind: fix packages: - - "@typespec/http-server-csharp" + - typespec-vscode --- -Fix nullable types, anonymous types, and safeInt +Support 'See Document' quick action to view the details of linter rules diff --git a/.chronus/changes/synced-with-versioning-removed-in-cadl-ranch-2024-10-28-15-49-29.md b/.chronus/changes/synced-with-versioning-removed-in-cadl-ranch-2024-10-28-15-49-29.md deleted file mode 100644 index 3704e00677..0000000000 --- a/.chronus/changes/synced-with-versioning-removed-in-cadl-ranch-2024-10-28-15-49-29.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -changeKind: fix -packages: - - "@typespec/http-specs" ---- - -update code in versioning/removed and removed type/model/templated. diff --git a/.chronus/changes/trailing-delimited-most-locations-2024-9-23-16-28-11.md b/.chronus/changes/trailing-delimited-most-locations-2024-9-23-16-28-11.md deleted file mode 100644 index c305222010..0000000000 --- a/.chronus/changes/trailing-delimited-most-locations-2024-9-23-16-28-11.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -# Change versionKind to one of: internal, fix, dependencies, feature, deprecation, breaking -changeKind: feature -packages: - - "@typespec/compiler" ---- - -Allow trailing delimiter in array values, tuple, decorator declaration, scalar initializer, etc. diff --git a/.chronus/changes/witemple-msft-hsj-additional-guard-in-2024-11-3-13-53-46.md b/.chronus/changes/witemple-msft-hsj-additional-guard-in-2024-11-3-13-53-46.md deleted file mode 100644 index 055349a9b8..0000000000 --- a/.chronus/changes/witemple-msft-hsj-additional-guard-in-2024-11-3-13-53-46.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -changeKind: fix -packages: - - "@typespec/http-server-javascript" ---- - -Added an additional check for the presence of a property before performing a bounds check on integer properties constrained to a range. \ No newline at end of file diff --git a/.chronus/changes/witemple-msft-hsj-additional-guard-in-2024-11-3-14-29-16.md b/.chronus/changes/witemple-msft-hsj-additional-guard-in-2024-11-3-14-29-16.md deleted file mode 100644 index b3aab707a6..0000000000 --- a/.chronus/changes/witemple-msft-hsj-additional-guard-in-2024-11-3-14-29-16.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -changeKind: fix -packages: - - "@typespec/http-server-javascript" ---- - -Fixed a null check in query parameter requiredness check by replacing it with a falseness check. diff --git a/.chronus/changes/witemple-msft-hsj-ignore-unspeakable-2024-10-25-15-54-27.md b/.chronus/changes/witemple-msft-hsj-ignore-unspeakable-2024-10-25-15-54-27.md deleted file mode 100644 index 22eac4d51a..0000000000 --- a/.chronus/changes/witemple-msft-hsj-ignore-unspeakable-2024-10-25-15-54-27.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -changeKind: fix -packages: - - "@typespec/http-server-javascript" ---- - -Added logic to handle "unspeakable" identifier names (#5185) \ No newline at end of file diff --git a/.chronus/changes/witemple-msft-realm-typekit-mutator-docs-2024-10-19-10-24-24.md b/.chronus/changes/witemple-msft-realm-typekit-mutator-docs-2024-10-19-10-24-24.md deleted file mode 100644 index 4855dd2fcd..0000000000 --- a/.chronus/changes/witemple-msft-realm-typekit-mutator-docs-2024-10-19-10-24-24.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -changeKind: feature -packages: - - "@typespec/compiler" ---- - -Experimental: Improve Realm, Mutator, and Typekit implementations. - -This change strongly binds a Realm and Typekit together, and changes mutators so that new types are cloned within the -mutator's realm. The default Typekit now creates a default typekit realm for the current program, and a Typekit can be -easily created to work in a specific Program or Realm as needed. diff --git a/.chronus/changes/witemple-msft-visibility-enum-2024-10-6-16-50-9.md b/.chronus/changes/witemple-msft-visibility-enum-2024-10-6-16-50-9.md deleted file mode 100644 index 082815372a..0000000000 --- a/.chronus/changes/witemple-msft-visibility-enum-2024-10-6-16-50-9.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -changeKind: feature -packages: - - "@typespec/compiler" ---- - -Adds support for enum-driven visibility in the compiler core. diff --git a/.chronus/changes/witemple-msft-visibility-enum-2024-10-6-16-53-11.md b/.chronus/changes/witemple-msft-visibility-enum-2024-10-6-16-53-11.md deleted file mode 100644 index a2c7cd59bc..0000000000 --- a/.chronus/changes/witemple-msft-visibility-enum-2024-10-6-16-53-11.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -changeKind: internal -packages: - - "@typespec/http" - - "@typespec/openapi" ---- - -Mask deprecation on getVisibility diff --git a/packages/bundler/CHANGELOG.md b/packages/bundler/CHANGELOG.md index e4e9e470cc..a38c542174 100644 --- a/packages/bundler/CHANGELOG.md +++ b/packages/bundler/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log - @typespec/bundler +## 0.1.10 + +No changes, version bump only. + ## 0.1.9 ### Bump dependencies diff --git a/packages/bundler/package.json b/packages/bundler/package.json index f1bfc53580..864a362c2f 100644 --- a/packages/bundler/package.json +++ b/packages/bundler/package.json @@ -1,6 +1,6 @@ { "name": "@typespec/bundler", - "version": "0.1.9", + "version": "0.1.10", "author": "Microsoft Corporation", "description": "Package to bundle a TypeSpec library.", "homepage": "https://typespec.io", diff --git a/packages/compiler/CHANGELOG.md b/packages/compiler/CHANGELOG.md index 40f8861dae..01335efba6 100644 --- a/packages/compiler/CHANGELOG.md +++ b/packages/compiler/CHANGELOG.md @@ -1,5 +1,23 @@ # Change Log - @typespec/compiler +## 0.63.0 + +### Bug Fixes + +- [#5252](https://github.com/microsoft/typespec/pull/5252) Added RegEx validation for @pattern and will throw warning for invalid RegEx string + +### Features + +- [#4937](https://github.com/microsoft/typespec/pull/4937) Add mutateSubgraphWithNamespace as a separate API +- [#4837](https://github.com/microsoft/typespec/pull/4837) Allow trailing delimiter in array values, tuple, decorator declaration, scalar initializer, etc. +- [#5149](https://github.com/microsoft/typespec/pull/5149) Experimental: Improve Realm, Mutator, and Typekit implementations. + +This change strongly binds a Realm and Typekit together, and changes mutators so that new types are cloned within the +mutator's realm. The default Typekit now creates a default typekit realm for the current program, and a Typekit can be +easily created to work in a specific Program or Realm as needed. +- [#4825](https://github.com/microsoft/typespec/pull/4825) Adds support for enum-driven visibility in the compiler core. + + ## 0.62.0 ### Bug Fixes diff --git a/packages/compiler/package.json b/packages/compiler/package.json index 58e46ce4a3..1b482997d1 100644 --- a/packages/compiler/package.json +++ b/packages/compiler/package.json @@ -1,6 +1,6 @@ { "name": "@typespec/compiler", - "version": "0.62.0", + "version": "0.63.0", "description": "TypeSpec Compiler Preview", "author": "Microsoft Corporation", "license": "MIT", diff --git a/packages/compiler/src/core/logger/console-sink.ts b/packages/compiler/src/core/logger/console-sink.ts index 87f03d7fd8..b7c023319a 100644 --- a/packages/compiler/src/core/logger/console-sink.ts +++ b/packages/compiler/src/core/logger/console-sink.ts @@ -8,6 +8,7 @@ import { supportsHyperlink } from "./support-hyperlinks.js"; export interface FormatLogOptions { pathRelativeTo?: string; pretty?: boolean; + excludeLogLevel?: boolean; } export interface ConsoleSinkOptions extends FormatLogOptions {} @@ -33,8 +34,8 @@ function hyperlink(text: string, url: string | undefined, options: FormatLogOpti export function formatLog(log: ProcessedLog, options: FormatLogOptions): string { const code = log.code ? ` ${hyperlink(color(options, log.code, pc.gray), log.url, options)}` : ""; - const level = formatLevel(options, log.level); - const content = `${level}${code}: ${log.message}`; + const level: string = options.excludeLogLevel === true ? "" : formatLevel(options, log.level); + const content = level || code ? `${level}${code}: ${log.message}` : log.message; const root = log.sourceLocation; if (root?.file) { const formattedLocation = formatSourceLocation(options, root); diff --git a/packages/compiler/src/server/serverlib.ts b/packages/compiler/src/server/serverlib.ts index 0e883c04b7..eb47f25d09 100644 --- a/packages/compiler/src/server/serverlib.ts +++ b/packages/compiler/src/server/serverlib.ts @@ -50,7 +50,8 @@ import { resolveCodeFix } from "../core/code-fixes.js"; import { compilerAssert, getSourceLocation } from "../core/diagnostics.js"; import { formatTypeSpec } from "../core/formatter.js"; import { getEntityName, getTypeName } from "../core/helpers/type-name-utils.js"; -import { resolveModule, ResolveModuleHost } from "../core/index.js"; +import { ProcessedLog, resolveModule, ResolveModuleHost } from "../core/index.js"; +import { formatLog } from "../core/logger/index.js"; import { getPositionBeforeTrivia } from "../core/parser-utils.js"; import { getNodeAtPosition, getNodeAtPositionDetail, visitChildren } from "../core/parser.js"; import { ensureTrailingDirectorySeparator, getDirectoryPath } from "../core/path-utils.js"; @@ -963,6 +964,16 @@ export function createServer(host: ServerHost): Server { readFile, stat, getSourceFileKind, + logSink: { + log: (log: ProcessedLog) => { + const msg = formatLog(log, { excludeLogLevel: true }); + const sLog: ServerLog = { + level: log.level, + message: msg, + }; + host.log(sLog); + }, + }, }; async function readFile(path: string): Promise { diff --git a/packages/compiler/templates/scaffolding.json b/packages/compiler/templates/scaffolding.json index f70c8b9e60..2ae2fdb4e9 100644 --- a/packages/compiler/templates/scaffolding.json +++ b/packages/compiler/templates/scaffolding.json @@ -3,12 +3,12 @@ "title": "Empty project", "description": "Create an empty project.", "libraries": [], - "compilerVersion": "0.62.0" + "compilerVersion": "0.63.0" }, "rest": { "title": "Generic REST API", "description": "Create a project representing a generic REST API", - "compilerVersion": "0.62.0", + "compilerVersion": "0.63.0", "libraries": [ "@typespec/http", "@typespec/rest", @@ -23,7 +23,7 @@ "library-ts": { "title": "TypeSpec Library (With TypeScript)", "description": "Create a new package to add decorators or linters to typespec.", - "compilerVersion": "0.62.0", + "compilerVersion": "0.63.0", "libraries": [], "files": [ { @@ -99,7 +99,7 @@ "emitter-ts": { "title": "TypeSpec Emitter (With TypeScript)", "description": "Create a new package that will be emitting typespec", - "compilerVersion": "0.62.0", + "compilerVersion": "0.63.0", "libraries": [], "files": [ { diff --git a/packages/eslint-plugin-typespec/CHANGELOG.md b/packages/eslint-plugin-typespec/CHANGELOG.md index 0691b70b93..9b7073e7aa 100644 --- a/packages/eslint-plugin-typespec/CHANGELOG.md +++ b/packages/eslint-plugin-typespec/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log - @typespec/eslint-plugin +## 0.63.0 + +No changes, version bump only. + ## 0.62.0 ### Bump dependencies diff --git a/packages/eslint-plugin-typespec/package.json b/packages/eslint-plugin-typespec/package.json index 0b01186df7..d3003f15f0 100644 --- a/packages/eslint-plugin-typespec/package.json +++ b/packages/eslint-plugin-typespec/package.json @@ -1,6 +1,6 @@ { "name": "@typespec/eslint-plugin", - "version": "0.62.0", + "version": "0.63.0", "author": "Microsoft Corporation", "description": "Eslint plugin providing set of rules to be used in the JS/TS code of TypeSpec libraries", "homepage": "https://typespec.io", diff --git a/packages/events/CHANGELOG.md b/packages/events/CHANGELOG.md index 1474e30d0c..5420f563f9 100644 --- a/packages/events/CHANGELOG.md +++ b/packages/events/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog - @typespec/events +## 0.63.0 + +No changes, version bump only. + ## 0.62.0 ### Bump dependencies diff --git a/packages/events/package.json b/packages/events/package.json index 8a5dcbb766..b596f8f5a4 100644 --- a/packages/events/package.json +++ b/packages/events/package.json @@ -1,6 +1,6 @@ { "name": "@typespec/events", - "version": "0.62.0", + "version": "0.63.0", "author": "Microsoft Corporation", "description": "TypeSpec library providing events bindings", "homepage": "https://typespec.io", diff --git a/packages/html-program-viewer/CHANGELOG.md b/packages/html-program-viewer/CHANGELOG.md index bf4ae5e0a2..3bff611110 100644 --- a/packages/html-program-viewer/CHANGELOG.md +++ b/packages/html-program-viewer/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log - @typespec/html-program-viewer +## 0.63.0 + +No changes, version bump only. + ## 0.62.0 ### Bump dependencies diff --git a/packages/html-program-viewer/package.json b/packages/html-program-viewer/package.json index 2a793254c3..e858fea5b5 100644 --- a/packages/html-program-viewer/package.json +++ b/packages/html-program-viewer/package.json @@ -1,6 +1,6 @@ { "name": "@typespec/html-program-viewer", - "version": "0.62.0", + "version": "0.63.0", "author": "Microsoft Corporation", "description": "TypeSpec library for emitting an html view of the program.", "homepage": "https://typespec.io", diff --git a/packages/http-client-csharp/eng/scripts/Generate.ps1 b/packages/http-client-csharp/eng/scripts/Generate.ps1 index 05134142c8..09eb3be3db 100644 --- a/packages/http-client-csharp/eng/scripts/Generate.ps1 +++ b/packages/http-client-csharp/eng/scripts/Generate.ps1 @@ -50,6 +50,7 @@ function IsSpecDir { $failingSpecs = @( Join-Path 'http' 'payload' 'pageable' + Join-Path 'http' 'payload' 'xml' Join-Path 'http' 'special-headers' 'conditional-request' Join-Path 'http' 'type' 'model' 'flatten' Join-Path 'http' 'type' 'model' 'templated' diff --git a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/Properties/launchSettings.json b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/Properties/launchSettings.json index f2d5ebb72d..7e1721b39f 100644 --- a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/Properties/launchSettings.json +++ b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/Properties/launchSettings.json @@ -115,11 +115,6 @@ "commandName": "Executable", "executablePath": "$(SolutionDir)/../dist/generator/Microsoft.Generator.CSharp.exe" }, - "http-payload-xml": { - "commandLineArgs": "$(SolutionDir)/TestProjects/CadlRanch/http/payload/xml -p StubLibraryPlugin", - "commandName": "Executable", - "executablePath": "$(SolutionDir)/../dist/generator/Microsoft.Generator.CSharp.exe" - }, "http-resiliency-srv-driven-v1": { "commandLineArgs": "$(SolutionDir)/TestProjects/CadlRanch/http/resiliency/srv-driven/v1 -p StubLibraryPlugin", "commandName": "Executable", diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/Configuration.json b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/Configuration.json deleted file mode 100644 index 8c15e60ef5..0000000000 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/Configuration.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "output-folder": ".", - "namespace": "Payload.Xml", - "library-name": "Payload.Xml", - "use-model-reader-writer": true -} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/Payload.Xml.sln b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/Payload.Xml.sln deleted file mode 100644 index cc8a0e28df..0000000000 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/Payload.Xml.sln +++ /dev/null @@ -1,48 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.29709.97 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Payload.Xml", "src\Payload.Xml.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.Build.0 = Release|Any CPU - {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.Build.0 = Release|Any CPU - {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.Build.0 = Release|Any CPU - {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.Build.0 = Release|Any CPU - {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.Build.0 = Release|Any CPU - {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.Build.0 = Debug|Any CPU - {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.ActiveCfg = Release|Any CPU - {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.Build.0 = Release|Any CPU - {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {A97F4B90-2591-4689-B1F8-5F21FE6D6CAE} - EndGlobalSection -EndGlobal diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/ModelWithArrayOfModelValue.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/ModelWithArrayOfModelValue.cs deleted file mode 100644 index d97bb23104..0000000000 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/ModelWithArrayOfModelValue.cs +++ /dev/null @@ -1,35 +0,0 @@ -// - -#nullable disable - -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Threading; -using System.Threading.Tasks; -using Payload.Xml.Models; - -namespace Payload.Xml -{ - public partial class ModelWithArrayOfModelValue - { - protected ModelWithArrayOfModelValue() => throw null; - - public ClientPipeline Pipeline => throw null; - - public virtual ClientResult Get(RequestOptions options) => throw null; - - public virtual Task GetAsync(RequestOptions options) => throw null; - - public virtual ClientResult Get() => throw null; - - public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; - - public virtual ClientResult Put(BinaryContent content, RequestOptions options = null) => throw null; - - public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - - public virtual ClientResult Put(ModelWithArrayOfModel input) => throw null; - - public virtual Task PutAsync(ModelWithArrayOfModel input, CancellationToken cancellationToken = default) => throw null; - } -} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/ModelWithAttributesValue.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/ModelWithAttributesValue.cs deleted file mode 100644 index d36d1a98e4..0000000000 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/ModelWithAttributesValue.cs +++ /dev/null @@ -1,35 +0,0 @@ -// - -#nullable disable - -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Threading; -using System.Threading.Tasks; -using Payload.Xml.Models; - -namespace Payload.Xml -{ - public partial class ModelWithAttributesValue - { - protected ModelWithAttributesValue() => throw null; - - public ClientPipeline Pipeline => throw null; - - public virtual ClientResult Get(RequestOptions options) => throw null; - - public virtual Task GetAsync(RequestOptions options) => throw null; - - public virtual ClientResult Get() => throw null; - - public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; - - public virtual ClientResult Put(BinaryContent content, RequestOptions options = null) => throw null; - - public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - - public virtual ClientResult Put(ModelWithAttributes input) => throw null; - - public virtual Task PutAsync(ModelWithAttributes input, CancellationToken cancellationToken = default) => throw null; - } -} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/ModelWithDictionaryValue.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/ModelWithDictionaryValue.cs deleted file mode 100644 index 5326a01610..0000000000 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/ModelWithDictionaryValue.cs +++ /dev/null @@ -1,35 +0,0 @@ -// - -#nullable disable - -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Threading; -using System.Threading.Tasks; -using Payload.Xml.Models; - -namespace Payload.Xml -{ - public partial class ModelWithDictionaryValue - { - protected ModelWithDictionaryValue() => throw null; - - public ClientPipeline Pipeline => throw null; - - public virtual ClientResult Get(RequestOptions options) => throw null; - - public virtual Task GetAsync(RequestOptions options) => throw null; - - public virtual ClientResult Get() => throw null; - - public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; - - public virtual ClientResult Put(BinaryContent content, RequestOptions options = null) => throw null; - - public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - - public virtual ClientResult Put(ModelWithDictionary input) => throw null; - - public virtual Task PutAsync(ModelWithDictionary input, CancellationToken cancellationToken = default) => throw null; - } -} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/ModelWithEmptyArrayValue.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/ModelWithEmptyArrayValue.cs deleted file mode 100644 index 4f8a338ad1..0000000000 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/ModelWithEmptyArrayValue.cs +++ /dev/null @@ -1,35 +0,0 @@ -// - -#nullable disable - -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Threading; -using System.Threading.Tasks; -using Payload.Xml.Models; - -namespace Payload.Xml -{ - public partial class ModelWithEmptyArrayValue - { - protected ModelWithEmptyArrayValue() => throw null; - - public ClientPipeline Pipeline => throw null; - - public virtual ClientResult Get(RequestOptions options) => throw null; - - public virtual Task GetAsync(RequestOptions options) => throw null; - - public virtual ClientResult Get() => throw null; - - public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; - - public virtual ClientResult Put(BinaryContent content, RequestOptions options = null) => throw null; - - public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - - public virtual ClientResult Put(ModelWithEmptyArray input) => throw null; - - public virtual Task PutAsync(ModelWithEmptyArray input, CancellationToken cancellationToken = default) => throw null; - } -} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/ModelWithEncodedNamesValue.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/ModelWithEncodedNamesValue.cs deleted file mode 100644 index ef8d42468c..0000000000 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/ModelWithEncodedNamesValue.cs +++ /dev/null @@ -1,35 +0,0 @@ -// - -#nullable disable - -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Threading; -using System.Threading.Tasks; -using Payload.Xml.Models; - -namespace Payload.Xml -{ - public partial class ModelWithEncodedNamesValue - { - protected ModelWithEncodedNamesValue() => throw null; - - public ClientPipeline Pipeline => throw null; - - public virtual ClientResult Get(RequestOptions options) => throw null; - - public virtual Task GetAsync(RequestOptions options) => throw null; - - public virtual ClientResult Get() => throw null; - - public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; - - public virtual ClientResult Put(BinaryContent content, RequestOptions options = null) => throw null; - - public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - - public virtual ClientResult Put(ModelWithEncodedNames input) => throw null; - - public virtual Task PutAsync(ModelWithEncodedNames input, CancellationToken cancellationToken = default) => throw null; - } -} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/ModelWithOptionalFieldValue.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/ModelWithOptionalFieldValue.cs deleted file mode 100644 index 22a25317dd..0000000000 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/ModelWithOptionalFieldValue.cs +++ /dev/null @@ -1,35 +0,0 @@ -// - -#nullable disable - -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Threading; -using System.Threading.Tasks; -using Payload.Xml.Models; - -namespace Payload.Xml -{ - public partial class ModelWithOptionalFieldValue - { - protected ModelWithOptionalFieldValue() => throw null; - - public ClientPipeline Pipeline => throw null; - - public virtual ClientResult Get(RequestOptions options) => throw null; - - public virtual Task GetAsync(RequestOptions options) => throw null; - - public virtual ClientResult Get() => throw null; - - public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; - - public virtual ClientResult Put(BinaryContent content, RequestOptions options = null) => throw null; - - public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - - public virtual ClientResult Put(ModelWithOptionalField input) => throw null; - - public virtual Task PutAsync(ModelWithOptionalField input, CancellationToken cancellationToken = default) => throw null; - } -} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/ModelWithRenamedArraysValue.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/ModelWithRenamedArraysValue.cs deleted file mode 100644 index 15bb6208eb..0000000000 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/ModelWithRenamedArraysValue.cs +++ /dev/null @@ -1,35 +0,0 @@ -// - -#nullable disable - -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Threading; -using System.Threading.Tasks; -using Payload.Xml.Models; - -namespace Payload.Xml -{ - public partial class ModelWithRenamedArraysValue - { - protected ModelWithRenamedArraysValue() => throw null; - - public ClientPipeline Pipeline => throw null; - - public virtual ClientResult Get(RequestOptions options) => throw null; - - public virtual Task GetAsync(RequestOptions options) => throw null; - - public virtual ClientResult Get() => throw null; - - public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; - - public virtual ClientResult Put(BinaryContent content, RequestOptions options = null) => throw null; - - public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - - public virtual ClientResult Put(ModelWithRenamedArrays input) => throw null; - - public virtual Task PutAsync(ModelWithRenamedArrays input, CancellationToken cancellationToken = default) => throw null; - } -} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/ModelWithRenamedFieldsValue.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/ModelWithRenamedFieldsValue.cs deleted file mode 100644 index 6878af75f0..0000000000 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/ModelWithRenamedFieldsValue.cs +++ /dev/null @@ -1,35 +0,0 @@ -// - -#nullable disable - -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Threading; -using System.Threading.Tasks; -using Payload.Xml.Models; - -namespace Payload.Xml -{ - public partial class ModelWithRenamedFieldsValue - { - protected ModelWithRenamedFieldsValue() => throw null; - - public ClientPipeline Pipeline => throw null; - - public virtual ClientResult Get(RequestOptions options) => throw null; - - public virtual Task GetAsync(RequestOptions options) => throw null; - - public virtual ClientResult Get() => throw null; - - public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; - - public virtual ClientResult Put(BinaryContent content, RequestOptions options = null) => throw null; - - public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - - public virtual ClientResult Put(ModelWithRenamedFields input) => throw null; - - public virtual Task PutAsync(ModelWithRenamedFields input, CancellationToken cancellationToken = default) => throw null; - } -} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/ModelWithSimpleArraysValue.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/ModelWithSimpleArraysValue.cs deleted file mode 100644 index f9db5db5d8..0000000000 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/ModelWithSimpleArraysValue.cs +++ /dev/null @@ -1,35 +0,0 @@ -// - -#nullable disable - -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Threading; -using System.Threading.Tasks; -using Payload.Xml.Models; - -namespace Payload.Xml -{ - public partial class ModelWithSimpleArraysValue - { - protected ModelWithSimpleArraysValue() => throw null; - - public ClientPipeline Pipeline => throw null; - - public virtual ClientResult Get(RequestOptions options) => throw null; - - public virtual Task GetAsync(RequestOptions options) => throw null; - - public virtual ClientResult Get() => throw null; - - public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; - - public virtual ClientResult Put(BinaryContent content, RequestOptions options = null) => throw null; - - public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - - public virtual ClientResult Put(ModelWithSimpleArrays input) => throw null; - - public virtual Task PutAsync(ModelWithSimpleArrays input, CancellationToken cancellationToken = default) => throw null; - } -} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/ModelWithTextValue.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/ModelWithTextValue.cs deleted file mode 100644 index 4c9d646f8c..0000000000 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/ModelWithTextValue.cs +++ /dev/null @@ -1,35 +0,0 @@ -// - -#nullable disable - -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Threading; -using System.Threading.Tasks; -using Payload.Xml.Models; - -namespace Payload.Xml -{ - public partial class ModelWithTextValue - { - protected ModelWithTextValue() => throw null; - - public ClientPipeline Pipeline => throw null; - - public virtual ClientResult Get(RequestOptions options) => throw null; - - public virtual Task GetAsync(RequestOptions options) => throw null; - - public virtual ClientResult Get() => throw null; - - public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; - - public virtual ClientResult Put(BinaryContent content, RequestOptions options = null) => throw null; - - public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - - public virtual ClientResult Put(ModelWithText input) => throw null; - - public virtual Task PutAsync(ModelWithText input, CancellationToken cancellationToken = default) => throw null; - } -} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/ModelWithUnwrappedArrayValue.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/ModelWithUnwrappedArrayValue.cs deleted file mode 100644 index bd6624fdfb..0000000000 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/ModelWithUnwrappedArrayValue.cs +++ /dev/null @@ -1,35 +0,0 @@ -// - -#nullable disable - -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Threading; -using System.Threading.Tasks; -using Payload.Xml.Models; - -namespace Payload.Xml -{ - public partial class ModelWithUnwrappedArrayValue - { - protected ModelWithUnwrappedArrayValue() => throw null; - - public ClientPipeline Pipeline => throw null; - - public virtual ClientResult Get(RequestOptions options) => throw null; - - public virtual Task GetAsync(RequestOptions options) => throw null; - - public virtual ClientResult Get() => throw null; - - public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; - - public virtual ClientResult Put(BinaryContent content, RequestOptions options = null) => throw null; - - public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - - public virtual ClientResult Put(ModelWithUnwrappedArray input) => throw null; - - public virtual Task PutAsync(ModelWithUnwrappedArray input, CancellationToken cancellationToken = default) => throw null; - } -} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithArrayOfModel.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithArrayOfModel.Serialization.cs deleted file mode 100644 index 9374603f7d..0000000000 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithArrayOfModel.Serialization.cs +++ /dev/null @@ -1,36 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Text.Json; - -namespace Payload.Xml.Models -{ - public partial class ModelWithArrayOfModel : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; - - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; - - ModelWithArrayOfModel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; - - protected virtual ModelWithArrayOfModel JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; - - protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; - - ModelWithArrayOfModel IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; - - protected virtual ModelWithArrayOfModel PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; - - public static implicit operator BinaryContent(ModelWithArrayOfModel modelWithArrayOfModel) => throw null; - - public static explicit operator ModelWithArrayOfModel(ClientResult result) => throw null; - } -} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithArrayOfModel.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithArrayOfModel.cs deleted file mode 100644 index 4903ea5b6b..0000000000 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithArrayOfModel.cs +++ /dev/null @@ -1,15 +0,0 @@ -// - -#nullable disable - -using System.Collections.Generic; - -namespace Payload.Xml.Models -{ - public partial class ModelWithArrayOfModel - { - public ModelWithArrayOfModel(IEnumerable items) => throw null; - - public IList Items => throw null; - } -} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithAttributes.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithAttributes.Serialization.cs deleted file mode 100644 index a76524203b..0000000000 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithAttributes.Serialization.cs +++ /dev/null @@ -1,36 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Text.Json; - -namespace Payload.Xml.Models -{ - public partial class ModelWithAttributes : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; - - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; - - ModelWithAttributes IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; - - protected virtual ModelWithAttributes JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; - - protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; - - ModelWithAttributes IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; - - protected virtual ModelWithAttributes PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; - - public static implicit operator BinaryContent(ModelWithAttributes modelWithAttributes) => throw null; - - public static explicit operator ModelWithAttributes(ClientResult result) => throw null; - } -} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithAttributes.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithAttributes.cs deleted file mode 100644 index 855225c144..0000000000 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithAttributes.cs +++ /dev/null @@ -1,29 +0,0 @@ -// - -#nullable disable - -namespace Payload.Xml.Models -{ - public partial class ModelWithAttributes - { - public ModelWithAttributes(int id1, string id2, bool enabled) => throw null; - - public int Id1 - { - get => throw null; - set => throw null; - } - - public string Id2 - { - get => throw null; - set => throw null; - } - - public bool Enabled - { - get => throw null; - set => throw null; - } - } -} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithDictionary.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithDictionary.Serialization.cs deleted file mode 100644 index 0ff9e516be..0000000000 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithDictionary.Serialization.cs +++ /dev/null @@ -1,36 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Text.Json; - -namespace Payload.Xml.Models -{ - public partial class ModelWithDictionary : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; - - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; - - ModelWithDictionary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; - - protected virtual ModelWithDictionary JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; - - protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; - - ModelWithDictionary IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; - - protected virtual ModelWithDictionary PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; - - public static implicit operator BinaryContent(ModelWithDictionary modelWithDictionary) => throw null; - - public static explicit operator ModelWithDictionary(ClientResult result) => throw null; - } -} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithDictionary.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithDictionary.cs deleted file mode 100644 index 35820e40a0..0000000000 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithDictionary.cs +++ /dev/null @@ -1,15 +0,0 @@ -// - -#nullable disable - -using System.Collections.Generic; - -namespace Payload.Xml.Models -{ - public partial class ModelWithDictionary - { - public ModelWithDictionary(IDictionary metadata) => throw null; - - public IDictionary Metadata => throw null; - } -} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithEmptyArray.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithEmptyArray.Serialization.cs deleted file mode 100644 index 1c4f4ebb18..0000000000 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithEmptyArray.Serialization.cs +++ /dev/null @@ -1,36 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Text.Json; - -namespace Payload.Xml.Models -{ - public partial class ModelWithEmptyArray : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; - - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; - - ModelWithEmptyArray IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; - - protected virtual ModelWithEmptyArray JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; - - protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; - - ModelWithEmptyArray IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; - - protected virtual ModelWithEmptyArray PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; - - public static implicit operator BinaryContent(ModelWithEmptyArray modelWithEmptyArray) => throw null; - - public static explicit operator ModelWithEmptyArray(ClientResult result) => throw null; - } -} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithEmptyArray.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithEmptyArray.cs deleted file mode 100644 index 0c1f9f0f9c..0000000000 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithEmptyArray.cs +++ /dev/null @@ -1,15 +0,0 @@ -// - -#nullable disable - -using System.Collections.Generic; - -namespace Payload.Xml.Models -{ - public partial class ModelWithEmptyArray - { - public ModelWithEmptyArray(IEnumerable items) => throw null; - - public IList Items => throw null; - } -} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithEncodedNames.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithEncodedNames.Serialization.cs deleted file mode 100644 index 34aa38cdc7..0000000000 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithEncodedNames.Serialization.cs +++ /dev/null @@ -1,36 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Text.Json; - -namespace Payload.Xml.Models -{ - public partial class ModelWithEncodedNames : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; - - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; - - ModelWithEncodedNames IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; - - protected virtual ModelWithEncodedNames JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; - - protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; - - ModelWithEncodedNames IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; - - protected virtual ModelWithEncodedNames PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; - - public static implicit operator BinaryContent(ModelWithEncodedNames modelWithEncodedNames) => throw null; - - public static explicit operator ModelWithEncodedNames(ClientResult result) => throw null; - } -} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithEncodedNames.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithEncodedNames.cs deleted file mode 100644 index e821941d1b..0000000000 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithEncodedNames.cs +++ /dev/null @@ -1,21 +0,0 @@ -// - -#nullable disable - -using System.Collections.Generic; - -namespace Payload.Xml.Models -{ - public partial class ModelWithEncodedNames - { - public ModelWithEncodedNames(SimpleModel modelData, IEnumerable colors) => throw null; - - public SimpleModel ModelData - { - get => throw null; - set => throw null; - } - - public IList Colors => throw null; - } -} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithOptionalField.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithOptionalField.Serialization.cs deleted file mode 100644 index 596502a4b1..0000000000 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithOptionalField.Serialization.cs +++ /dev/null @@ -1,36 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Text.Json; - -namespace Payload.Xml.Models -{ - public partial class ModelWithOptionalField : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; - - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; - - ModelWithOptionalField IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; - - protected virtual ModelWithOptionalField JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; - - protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; - - ModelWithOptionalField IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; - - protected virtual ModelWithOptionalField PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; - - public static implicit operator BinaryContent(ModelWithOptionalField modelWithOptionalField) => throw null; - - public static explicit operator ModelWithOptionalField(ClientResult result) => throw null; - } -} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithOptionalField.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithOptionalField.cs deleted file mode 100644 index 0119e041b3..0000000000 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithOptionalField.cs +++ /dev/null @@ -1,23 +0,0 @@ -// - -#nullable disable - -namespace Payload.Xml.Models -{ - public partial class ModelWithOptionalField - { - public ModelWithOptionalField(string item) => throw null; - - public string Item - { - get => throw null; - set => throw null; - } - - public int? Value - { - get => throw null; - set => throw null; - } - } -} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithRenamedArrays.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithRenamedArrays.Serialization.cs deleted file mode 100644 index 47e521601c..0000000000 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithRenamedArrays.Serialization.cs +++ /dev/null @@ -1,36 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Text.Json; - -namespace Payload.Xml.Models -{ - public partial class ModelWithRenamedArrays : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; - - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; - - ModelWithRenamedArrays IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; - - protected virtual ModelWithRenamedArrays JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; - - protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; - - ModelWithRenamedArrays IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; - - protected virtual ModelWithRenamedArrays PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; - - public static implicit operator BinaryContent(ModelWithRenamedArrays modelWithRenamedArrays) => throw null; - - public static explicit operator ModelWithRenamedArrays(ClientResult result) => throw null; - } -} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithRenamedArrays.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithRenamedArrays.cs deleted file mode 100644 index 5d8e2188b5..0000000000 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithRenamedArrays.cs +++ /dev/null @@ -1,17 +0,0 @@ -// - -#nullable disable - -using System.Collections.Generic; - -namespace Payload.Xml.Models -{ - public partial class ModelWithRenamedArrays - { - public ModelWithRenamedArrays(IEnumerable colors, IEnumerable counts) => throw null; - - public IList Colors => throw null; - - public IList Counts => throw null; - } -} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithRenamedFields.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithRenamedFields.Serialization.cs deleted file mode 100644 index cf9ebc10b7..0000000000 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithRenamedFields.Serialization.cs +++ /dev/null @@ -1,36 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Text.Json; - -namespace Payload.Xml.Models -{ - public partial class ModelWithRenamedFields : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; - - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; - - ModelWithRenamedFields IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; - - protected virtual ModelWithRenamedFields JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; - - protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; - - ModelWithRenamedFields IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; - - protected virtual ModelWithRenamedFields PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; - - public static implicit operator BinaryContent(ModelWithRenamedFields modelWithRenamedFields) => throw null; - - public static explicit operator ModelWithRenamedFields(ClientResult result) => throw null; - } -} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithRenamedFields.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithRenamedFields.cs deleted file mode 100644 index 03c97d930e..0000000000 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithRenamedFields.cs +++ /dev/null @@ -1,23 +0,0 @@ -// - -#nullable disable - -namespace Payload.Xml.Models -{ - public partial class ModelWithRenamedFields - { - public ModelWithRenamedFields(SimpleModel inputData, SimpleModel outputData) => throw null; - - public SimpleModel InputData - { - get => throw null; - set => throw null; - } - - public SimpleModel OutputData - { - get => throw null; - set => throw null; - } - } -} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithSimpleArrays.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithSimpleArrays.Serialization.cs deleted file mode 100644 index cc65a22823..0000000000 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithSimpleArrays.Serialization.cs +++ /dev/null @@ -1,36 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Text.Json; - -namespace Payload.Xml.Models -{ - public partial class ModelWithSimpleArrays : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; - - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; - - ModelWithSimpleArrays IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; - - protected virtual ModelWithSimpleArrays JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; - - protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; - - ModelWithSimpleArrays IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; - - protected virtual ModelWithSimpleArrays PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; - - public static implicit operator BinaryContent(ModelWithSimpleArrays modelWithSimpleArrays) => throw null; - - public static explicit operator ModelWithSimpleArrays(ClientResult result) => throw null; - } -} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithSimpleArrays.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithSimpleArrays.cs deleted file mode 100644 index a3c5e9c89f..0000000000 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithSimpleArrays.cs +++ /dev/null @@ -1,17 +0,0 @@ -// - -#nullable disable - -using System.Collections.Generic; - -namespace Payload.Xml.Models -{ - public partial class ModelWithSimpleArrays - { - public ModelWithSimpleArrays(IEnumerable colors, IEnumerable counts) => throw null; - - public IList Colors => throw null; - - public IList Counts => throw null; - } -} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithText.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithText.Serialization.cs deleted file mode 100644 index 7fea64586a..0000000000 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithText.Serialization.cs +++ /dev/null @@ -1,36 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Text.Json; - -namespace Payload.Xml.Models -{ - public partial class ModelWithText : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; - - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; - - ModelWithText IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; - - protected virtual ModelWithText JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; - - protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; - - ModelWithText IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; - - protected virtual ModelWithText PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; - - public static implicit operator BinaryContent(ModelWithText modelWithText) => throw null; - - public static explicit operator ModelWithText(ClientResult result) => throw null; - } -} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithText.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithText.cs deleted file mode 100644 index 3912e629a4..0000000000 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithText.cs +++ /dev/null @@ -1,23 +0,0 @@ -// - -#nullable disable - -namespace Payload.Xml.Models -{ - public partial class ModelWithText - { - public ModelWithText(string language, string content) => throw null; - - public string Language - { - get => throw null; - set => throw null; - } - - public string Content - { - get => throw null; - set => throw null; - } - } -} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithUnwrappedArray.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithUnwrappedArray.Serialization.cs deleted file mode 100644 index ae74fce859..0000000000 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithUnwrappedArray.Serialization.cs +++ /dev/null @@ -1,36 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Text.Json; - -namespace Payload.Xml.Models -{ - public partial class ModelWithUnwrappedArray : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; - - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; - - ModelWithUnwrappedArray IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; - - protected virtual ModelWithUnwrappedArray JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; - - protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; - - ModelWithUnwrappedArray IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; - - protected virtual ModelWithUnwrappedArray PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; - - public static implicit operator BinaryContent(ModelWithUnwrappedArray modelWithUnwrappedArray) => throw null; - - public static explicit operator ModelWithUnwrappedArray(ClientResult result) => throw null; - } -} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithUnwrappedArray.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithUnwrappedArray.cs deleted file mode 100644 index ef9aff325f..0000000000 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/ModelWithUnwrappedArray.cs +++ /dev/null @@ -1,17 +0,0 @@ -// - -#nullable disable - -using System.Collections.Generic; - -namespace Payload.Xml.Models -{ - public partial class ModelWithUnwrappedArray - { - public ModelWithUnwrappedArray(IEnumerable colors, IEnumerable counts) => throw null; - - public IList Colors => throw null; - - public IList Counts => throw null; - } -} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/SimpleModel.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/SimpleModel.Serialization.cs deleted file mode 100644 index 52b932b4a0..0000000000 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/SimpleModel.Serialization.cs +++ /dev/null @@ -1,36 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Text.Json; - -namespace Payload.Xml.Models -{ - public partial class SimpleModel : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; - - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; - - SimpleModel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; - - protected virtual SimpleModel JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; - - protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; - - SimpleModel IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; - - protected virtual SimpleModel PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; - - public static implicit operator BinaryContent(SimpleModel simpleModel) => throw null; - - public static explicit operator SimpleModel(ClientResult result) => throw null; - } -} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/SimpleModel.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/SimpleModel.cs deleted file mode 100644 index 1e77e59a30..0000000000 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/Models/SimpleModel.cs +++ /dev/null @@ -1,23 +0,0 @@ -// - -#nullable disable - -namespace Payload.Xml.Models -{ - public partial class SimpleModel - { - public SimpleModel(string name, int age) => throw null; - - public string Name - { - get => throw null; - set => throw null; - } - - public int Age - { - get => throw null; - set => throw null; - } - } -} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/PayloadXmlModelFactory.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/PayloadXmlModelFactory.cs deleted file mode 100644 index a9bedbe182..0000000000 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/PayloadXmlModelFactory.cs +++ /dev/null @@ -1,35 +0,0 @@ -// - -#nullable disable - -using System.Collections.Generic; - -namespace Payload.Xml.Models -{ - public static partial class PayloadXmlModelFactory - { - public static ModelWithEncodedNames ModelWithEncodedNames(SimpleModel modelData = default, IEnumerable colors = default) => throw null; - - public static SimpleModel SimpleModel(string name = default, int age = default) => throw null; - - public static ModelWithDictionary ModelWithDictionary(IDictionary metadata = default) => throw null; - - public static ModelWithText ModelWithText(string language = default, string content = default) => throw null; - - public static ModelWithEmptyArray ModelWithEmptyArray(IEnumerable items = default) => throw null; - - public static ModelWithRenamedFields ModelWithRenamedFields(SimpleModel inputData = default, SimpleModel outputData = default) => throw null; - - public static ModelWithRenamedArrays ModelWithRenamedArrays(IEnumerable colors = default, IEnumerable counts = default) => throw null; - - public static ModelWithUnwrappedArray ModelWithUnwrappedArray(IEnumerable colors = default, IEnumerable counts = default) => throw null; - - public static ModelWithAttributes ModelWithAttributes(int id1 = default, string id2 = default, bool enabled = default) => throw null; - - public static ModelWithOptionalField ModelWithOptionalField(string item = default, int? value = default) => throw null; - - public static ModelWithArrayOfModel ModelWithArrayOfModel(IEnumerable items = default) => throw null; - - public static ModelWithSimpleArrays ModelWithSimpleArrays(IEnumerable colors = default, IEnumerable counts = default) => throw null; - } -} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/SimpleModelValue.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/SimpleModelValue.cs deleted file mode 100644 index abcdd7dc3b..0000000000 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/SimpleModelValue.cs +++ /dev/null @@ -1,35 +0,0 @@ -// - -#nullable disable - -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Threading; -using System.Threading.Tasks; -using Payload.Xml.Models; - -namespace Payload.Xml -{ - public partial class SimpleModelValue - { - protected SimpleModelValue() => throw null; - - public ClientPipeline Pipeline => throw null; - - public virtual ClientResult Get(RequestOptions options) => throw null; - - public virtual Task GetAsync(RequestOptions options) => throw null; - - public virtual ClientResult Get() => throw null; - - public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; - - public virtual ClientResult Put(BinaryContent content, RequestOptions options = null) => throw null; - - public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - - public virtual ClientResult Put(SimpleModel input) => throw null; - - public virtual Task PutAsync(SimpleModel input, CancellationToken cancellationToken = default) => throw null; - } -} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/XmlClient.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/XmlClient.cs deleted file mode 100644 index 980b4fce21..0000000000 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/XmlClient.cs +++ /dev/null @@ -1,42 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; - -namespace Payload.Xml -{ - public partial class XmlClient - { - public XmlClient() : this(new Uri("http://localhost:3000"), new XmlClientOptions()) => throw null; - - public XmlClient(Uri endpoint, XmlClientOptions options) => throw null; - - public ClientPipeline Pipeline => throw null; - - public virtual SimpleModelValue GetSimpleModelValueClient() => throw null; - - public virtual ModelWithSimpleArraysValue GetModelWithSimpleArraysValueClient() => throw null; - - public virtual ModelWithArrayOfModelValue GetModelWithArrayOfModelValueClient() => throw null; - - public virtual ModelWithOptionalFieldValue GetModelWithOptionalFieldValueClient() => throw null; - - public virtual ModelWithAttributesValue GetModelWithAttributesValueClient() => throw null; - - public virtual ModelWithUnwrappedArrayValue GetModelWithUnwrappedArrayValueClient() => throw null; - - public virtual ModelWithRenamedArraysValue GetModelWithRenamedArraysValueClient() => throw null; - - public virtual ModelWithRenamedFieldsValue GetModelWithRenamedFieldsValueClient() => throw null; - - public virtual ModelWithEmptyArrayValue GetModelWithEmptyArrayValueClient() => throw null; - - public virtual ModelWithTextValue GetModelWithTextValueClient() => throw null; - - public virtual ModelWithDictionaryValue GetModelWithDictionaryValueClient() => throw null; - - public virtual ModelWithEncodedNamesValue GetModelWithEncodedNamesValueClient() => throw null; - } -} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/XmlClientOptions.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/XmlClientOptions.cs deleted file mode 100644 index 467bebf98b..0000000000 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Generated/XmlClientOptions.cs +++ /dev/null @@ -1,12 +0,0 @@ -// - -#nullable disable - -using System.ClientModel.Primitives; - -namespace Payload.Xml -{ - public partial class XmlClientOptions : ClientPipelineOptions - { - } -} diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Payload.Xml.csproj b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Payload.Xml.csproj deleted file mode 100644 index 8e68e7a868..0000000000 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/src/Payload.Xml.csproj +++ /dev/null @@ -1,16 +0,0 @@ - - - This is the Payload.Xml client library for developing .NET applications with rich experience. - SDK Code Generation Payload.Xml - 1.0.0-beta.1 - Payload.Xml - netstandard2.0 - latest - true - - - - - - - diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/tspCodeModel.json b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/tspCodeModel.json deleted file mode 100644 index 526887cef4..0000000000 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/xml/tspCodeModel.json +++ /dev/null @@ -1,3150 +0,0 @@ -{ - "$id": "1", - "Name": "Payload.Xml", - "ApiVersions": [], - "Enums": [], - "Models": [ - { - "$id": "2", - "kind": "model", - "name": "ModelWithEncodedNames", - "crossLanguageDefinitionId": "Payload.Xml.ModelWithEncodedNames", - "usage": "Input,Output,Xml", - "description": "Uses encodedName instead of Xml.Name which is functionally equivalent.", - "decorators": [], - "properties": [ - { - "$id": "3", - "kind": "property", - "name": "modelData", - "serializedName": "modelData", - "type": { - "$id": "4", - "kind": "model", - "name": "SimpleModel", - "crossLanguageDefinitionId": "Payload.Xml.SimpleModel", - "usage": "Input,Output,Xml", - "description": "Contains fields of primitive types.", - "decorators": [], - "properties": [ - { - "$id": "5", - "kind": "property", - "name": "name", - "serializedName": "name", - "type": { - "$id": "6", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Payload.Xml.SimpleModel.name" - }, - { - "$id": "7", - "kind": "property", - "name": "age", - "serializedName": "age", - "type": { - "$id": "8", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Payload.Xml.SimpleModel.age" - } - ] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Payload.Xml.ModelWithEncodedNames.modelData" - }, - { - "$id": "9", - "kind": "property", - "name": "colors", - "serializedName": "colors", - "type": { - "$id": "10", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "11", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Payload.Xml.ModelWithEncodedNames.colors" - } - ] - }, - { - "$ref": "4" - }, - { - "$id": "12", - "kind": "model", - "name": "ModelWithDictionary", - "crossLanguageDefinitionId": "Payload.Xml.ModelWithDictionary", - "usage": "Input,Output,Xml", - "description": "Contains a dictionary of key value pairs.", - "decorators": [], - "properties": [ - { - "$id": "13", - "kind": "property", - "name": "metadata", - "serializedName": "metadata", - "type": { - "$id": "14", - "kind": "dict", - "keyType": { - "$id": "15", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "16", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Payload.Xml.ModelWithDictionary.metadata" - } - ] - }, - { - "$id": "17", - "kind": "model", - "name": "ModelWithText", - "crossLanguageDefinitionId": "Payload.Xml.ModelWithText", - "usage": "Input,Output,Xml", - "description": "Contains an attribute and text.", - "decorators": [], - "properties": [ - { - "$id": "18", - "kind": "property", - "name": "language", - "serializedName": "language", - "type": { - "$id": "19", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [ - { - "$id": "20", - "name": "TypeSpec.Xml.@attribute", - "arguments": { - "$id": "21" - } - } - ], - "crossLanguageDefinitionId": "Payload.Xml.ModelWithText.language" - }, - { - "$id": "22", - "kind": "property", - "name": "content", - "serializedName": "content", - "type": { - "$id": "23", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [ - { - "$id": "24", - "name": "TypeSpec.Xml.@unwrapped", - "arguments": { - "$id": "25" - } - } - ], - "crossLanguageDefinitionId": "Payload.Xml.ModelWithText.content" - } - ] - }, - { - "$id": "26", - "kind": "model", - "name": "ModelWithEmptyArray", - "crossLanguageDefinitionId": "Payload.Xml.ModelWithEmptyArray", - "usage": "Input,Output,Xml", - "description": "Contains an array of models that's supposed to be sent/received as an empty XML element.", - "decorators": [], - "properties": [ - { - "$id": "27", - "kind": "property", - "name": "items", - "serializedName": "items", - "type": { - "$id": "28", - "kind": "array", - "name": "ArraySimpleModel", - "valueType": { - "$ref": "4" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Payload.Xml.ModelWithEmptyArray.items" - } - ] - }, - { - "$id": "29", - "kind": "model", - "name": "ModelWithRenamedFields", - "crossLanguageDefinitionId": "Payload.Xml.ModelWithRenamedFields", - "usage": "Input,Output,Xml", - "description": "Contains fields of the same type that have different XML representation.", - "decorators": [ - { - "$id": "30", - "name": "TypeSpec.Xml.@name", - "arguments": { - "$id": "31", - "name": "ModelWithRenamedFieldsSrc" - } - } - ], - "properties": [ - { - "$id": "32", - "kind": "property", - "name": "inputData", - "serializedName": "inputData", - "type": { - "$ref": "4" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [ - { - "$id": "33", - "name": "TypeSpec.Xml.@name", - "arguments": { - "$id": "34", - "name": "InputData" - } - } - ], - "crossLanguageDefinitionId": "Payload.Xml.ModelWithRenamedFields.inputData" - }, - { - "$id": "35", - "kind": "property", - "name": "outputData", - "serializedName": "outputData", - "type": { - "$ref": "4" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [ - { - "$id": "36", - "name": "TypeSpec.Xml.@name", - "arguments": { - "$id": "37", - "name": "OutputData" - } - } - ], - "crossLanguageDefinitionId": "Payload.Xml.ModelWithRenamedFields.outputData" - } - ] - }, - { - "$id": "38", - "kind": "model", - "name": "ModelWithRenamedArrays", - "crossLanguageDefinitionId": "Payload.Xml.ModelWithRenamedArrays", - "usage": "Input,Output,Xml", - "description": "Contains fields of wrapped and unwrapped arrays of primitive types that have different XML representations.", - "decorators": [], - "properties": [ - { - "$id": "39", - "kind": "property", - "name": "colors", - "serializedName": "colors", - "type": { - "$id": "40", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "41", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [ - { - "$id": "42", - "name": "TypeSpec.Xml.@unwrapped", - "arguments": { - "$id": "43" - } - }, - { - "$id": "44", - "name": "TypeSpec.Xml.@name", - "arguments": { - "$id": "45", - "name": "Colors" - } - } - ], - "crossLanguageDefinitionId": "Payload.Xml.ModelWithRenamedArrays.colors" - }, - { - "$id": "46", - "kind": "property", - "name": "counts", - "serializedName": "counts", - "type": { - "$id": "47", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "48", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [ - { - "$id": "49", - "name": "TypeSpec.Xml.@name", - "arguments": { - "$id": "50", - "name": "Counts" - } - } - ], - "crossLanguageDefinitionId": "Payload.Xml.ModelWithRenamedArrays.counts" - } - ] - }, - { - "$id": "51", - "kind": "model", - "name": "ModelWithUnwrappedArray", - "crossLanguageDefinitionId": "Payload.Xml.ModelWithUnwrappedArray", - "usage": "Input,Output,Xml", - "description": "Contains fields of wrapped and unwrapped arrays of primitive types.", - "decorators": [], - "properties": [ - { - "$id": "52", - "kind": "property", - "name": "colors", - "serializedName": "colors", - "type": { - "$id": "53", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "54", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [ - { - "$id": "55", - "name": "TypeSpec.Xml.@unwrapped", - "arguments": { - "$id": "56" - } - } - ], - "crossLanguageDefinitionId": "Payload.Xml.ModelWithUnwrappedArray.colors" - }, - { - "$id": "57", - "kind": "property", - "name": "counts", - "serializedName": "counts", - "type": { - "$id": "58", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "59", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Payload.Xml.ModelWithUnwrappedArray.counts" - } - ] - }, - { - "$id": "60", - "kind": "model", - "name": "ModelWithAttributes", - "crossLanguageDefinitionId": "Payload.Xml.ModelWithAttributes", - "usage": "Input,Output,Xml", - "description": "Contains fields that are XML attributes.", - "decorators": [], - "properties": [ - { - "$id": "61", - "kind": "property", - "name": "id1", - "serializedName": "id1", - "type": { - "$id": "62", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [ - { - "$id": "63", - "name": "TypeSpec.Xml.@attribute", - "arguments": { - "$id": "64" - } - } - ], - "crossLanguageDefinitionId": "Payload.Xml.ModelWithAttributes.id1" - }, - { - "$id": "65", - "kind": "property", - "name": "id2", - "serializedName": "id2", - "type": { - "$id": "66", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [ - { - "$id": "67", - "name": "TypeSpec.Xml.@attribute", - "arguments": { - "$id": "68" - } - } - ], - "crossLanguageDefinitionId": "Payload.Xml.ModelWithAttributes.id2" - }, - { - "$id": "69", - "kind": "property", - "name": "enabled", - "serializedName": "enabled", - "type": { - "$id": "70", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Payload.Xml.ModelWithAttributes.enabled" - } - ] - }, - { - "$id": "71", - "kind": "model", - "name": "ModelWithOptionalField", - "crossLanguageDefinitionId": "Payload.Xml.ModelWithOptionalField", - "usage": "Input,Output,Xml", - "description": "Contains an optional field.", - "decorators": [], - "properties": [ - { - "$id": "72", - "kind": "property", - "name": "item", - "serializedName": "item", - "type": { - "$id": "73", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Payload.Xml.ModelWithOptionalField.item" - }, - { - "$id": "74", - "kind": "property", - "name": "value", - "serializedName": "value", - "type": { - "$id": "75", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Payload.Xml.ModelWithOptionalField.value" - } - ] - }, - { - "$id": "76", - "kind": "model", - "name": "ModelWithArrayOfModel", - "crossLanguageDefinitionId": "Payload.Xml.ModelWithArrayOfModel", - "usage": "Input,Output,Xml", - "description": "Contains an array of models.", - "decorators": [], - "properties": [ - { - "$id": "77", - "kind": "property", - "name": "items", - "serializedName": "items", - "type": { - "$id": "78", - "kind": "array", - "name": "ArraySimpleModel", - "valueType": { - "$ref": "4" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Payload.Xml.ModelWithArrayOfModel.items" - } - ] - }, - { - "$id": "79", - "kind": "model", - "name": "ModelWithSimpleArrays", - "crossLanguageDefinitionId": "Payload.Xml.ModelWithSimpleArrays", - "usage": "Input,Output,Xml", - "description": "Contains fields of arrays of primitive types.", - "decorators": [], - "properties": [ - { - "$id": "80", - "kind": "property", - "name": "colors", - "serializedName": "colors", - "type": { - "$id": "81", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "82", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Payload.Xml.ModelWithSimpleArrays.colors" - }, - { - "$id": "83", - "kind": "property", - "name": "counts", - "serializedName": "counts", - "type": { - "$id": "84", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "85", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Payload.Xml.ModelWithSimpleArrays.counts" - } - ] - } - ], - "Clients": [ - { - "$id": "86", - "Name": "XmlClient", - "Description": "Sends and receives bodies in XML format.", - "Operations": [], - "Protocol": { - "$id": "87" - }, - "Parameters": [ - { - "$id": "88", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "89", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "90", - "Type": { - "$id": "91", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "http://localhost:3000" - } - } - ], - "Decorators": [] - }, - { - "$id": "92", - "Name": "SimpleModelValue", - "Description": "Operations for the SimpleModel type.", - "Operations": [ - { - "$id": "93", - "Name": "get", - "ResourceName": "SimpleModelValue", - "Accessibility": "public", - "Parameters": [ - { - "$id": "94", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "95", - "kind": "constant", - "valueType": { - "$id": "96", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/xml", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "97", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "4" - }, - "BodyMediaType": "Json", - "Headers": [ - { - "$id": "98", - "Name": "contentType", - "NameInResponse": "content-type", - "Type": { - "$id": "99", - "kind": "constant", - "valueType": { - "$id": "100", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/xml", - "decorators": [] - } - } - ], - "IsErrorResponse": false, - "ContentTypes": [ - "application/xml" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/payload/xml/simpleModel", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "Payload.Xml.SimpleModelValue.get", - "Decorators": [] - }, - { - "$id": "101", - "Name": "put", - "ResourceName": "SimpleModelValue", - "Accessibility": "public", - "Parameters": [ - { - "$id": "102", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Type": { - "$id": "103", - "kind": "constant", - "valueType": { - "$id": "104", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/xml", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "105", - "Name": "input", - "NameInRequest": "input", - "Type": { - "$ref": "4" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "106", - "StatusCodes": [ - 204 - ], - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false - } - ], - "HttpMethod": "PUT", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/payload/xml/simpleModel", - "RequestMediaTypes": [ - "application/xml" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "Payload.Xml.SimpleModelValue.put", - "Decorators": [] - } - ], - "Protocol": { - "$id": "107" - }, - "Parent": "XmlClient", - "Parameters": [ - { - "$id": "108", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "109", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "110", - "Type": { - "$id": "111", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "http://localhost:3000" - } - } - ], - "Decorators": [] - }, - { - "$id": "112", - "Name": "ModelWithSimpleArraysValue", - "Description": "Operations for the ModelWithSimpleArrays type.", - "Operations": [ - { - "$id": "113", - "Name": "get", - "ResourceName": "ModelWithSimpleArraysValue", - "Accessibility": "public", - "Parameters": [ - { - "$id": "114", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "115", - "kind": "constant", - "valueType": { - "$id": "116", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/xml", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "117", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "79" - }, - "BodyMediaType": "Json", - "Headers": [ - { - "$id": "118", - "Name": "contentType", - "NameInResponse": "content-type", - "Type": { - "$id": "119", - "kind": "constant", - "valueType": { - "$id": "120", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/xml", - "decorators": [] - } - } - ], - "IsErrorResponse": false, - "ContentTypes": [ - "application/xml" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/payload/xml/modelWithSimpleArrays", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "Payload.Xml.ModelWithSimpleArraysValue.get", - "Decorators": [] - }, - { - "$id": "121", - "Name": "put", - "ResourceName": "ModelWithSimpleArraysValue", - "Accessibility": "public", - "Parameters": [ - { - "$id": "122", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Type": { - "$id": "123", - "kind": "constant", - "valueType": { - "$id": "124", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/xml", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "125", - "Name": "input", - "NameInRequest": "input", - "Type": { - "$ref": "79" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "126", - "StatusCodes": [ - 204 - ], - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false - } - ], - "HttpMethod": "PUT", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/payload/xml/modelWithSimpleArrays", - "RequestMediaTypes": [ - "application/xml" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "Payload.Xml.ModelWithSimpleArraysValue.put", - "Decorators": [] - } - ], - "Protocol": { - "$id": "127" - }, - "Parent": "XmlClient", - "Parameters": [ - { - "$id": "128", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "129", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "130", - "Type": { - "$id": "131", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "http://localhost:3000" - } - } - ], - "Decorators": [] - }, - { - "$id": "132", - "Name": "ModelWithArrayOfModelValue", - "Description": "Operations for the ModelWithArrayOfModel type.", - "Operations": [ - { - "$id": "133", - "Name": "get", - "ResourceName": "ModelWithArrayOfModelValue", - "Accessibility": "public", - "Parameters": [ - { - "$id": "134", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "135", - "kind": "constant", - "valueType": { - "$id": "136", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/xml", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "137", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "76" - }, - "BodyMediaType": "Json", - "Headers": [ - { - "$id": "138", - "Name": "contentType", - "NameInResponse": "content-type", - "Type": { - "$id": "139", - "kind": "constant", - "valueType": { - "$id": "140", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/xml", - "decorators": [] - } - } - ], - "IsErrorResponse": false, - "ContentTypes": [ - "application/xml" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/payload/xml/modelWithArrayOfModel", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "Payload.Xml.ModelWithArrayOfModelValue.get", - "Decorators": [] - }, - { - "$id": "141", - "Name": "put", - "ResourceName": "ModelWithArrayOfModelValue", - "Accessibility": "public", - "Parameters": [ - { - "$id": "142", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Type": { - "$id": "143", - "kind": "constant", - "valueType": { - "$id": "144", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/xml", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "145", - "Name": "input", - "NameInRequest": "input", - "Type": { - "$ref": "76" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "146", - "StatusCodes": [ - 204 - ], - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false - } - ], - "HttpMethod": "PUT", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/payload/xml/modelWithArrayOfModel", - "RequestMediaTypes": [ - "application/xml" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "Payload.Xml.ModelWithArrayOfModelValue.put", - "Decorators": [] - } - ], - "Protocol": { - "$id": "147" - }, - "Parent": "XmlClient", - "Parameters": [ - { - "$id": "148", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "149", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "150", - "Type": { - "$id": "151", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "http://localhost:3000" - } - } - ], - "Decorators": [] - }, - { - "$id": "152", - "Name": "ModelWithOptionalFieldValue", - "Description": "Operations for the ModelWithOptionalField type.", - "Operations": [ - { - "$id": "153", - "Name": "get", - "ResourceName": "ModelWithOptionalFieldValue", - "Accessibility": "public", - "Parameters": [ - { - "$id": "154", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "155", - "kind": "constant", - "valueType": { - "$id": "156", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/xml", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "157", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "71" - }, - "BodyMediaType": "Json", - "Headers": [ - { - "$id": "158", - "Name": "contentType", - "NameInResponse": "content-type", - "Type": { - "$id": "159", - "kind": "constant", - "valueType": { - "$id": "160", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/xml", - "decorators": [] - } - } - ], - "IsErrorResponse": false, - "ContentTypes": [ - "application/xml" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/payload/xml/modelWithOptionalField", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "Payload.Xml.ModelWithOptionalFieldValue.get", - "Decorators": [] - }, - { - "$id": "161", - "Name": "put", - "ResourceName": "ModelWithOptionalFieldValue", - "Accessibility": "public", - "Parameters": [ - { - "$id": "162", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Type": { - "$id": "163", - "kind": "constant", - "valueType": { - "$id": "164", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/xml", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "165", - "Name": "input", - "NameInRequest": "input", - "Type": { - "$ref": "71" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "166", - "StatusCodes": [ - 204 - ], - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false - } - ], - "HttpMethod": "PUT", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/payload/xml/modelWithOptionalField", - "RequestMediaTypes": [ - "application/xml" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "Payload.Xml.ModelWithOptionalFieldValue.put", - "Decorators": [] - } - ], - "Protocol": { - "$id": "167" - }, - "Parent": "XmlClient", - "Parameters": [ - { - "$id": "168", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "169", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "170", - "Type": { - "$id": "171", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "http://localhost:3000" - } - } - ], - "Decorators": [] - }, - { - "$id": "172", - "Name": "ModelWithAttributesValue", - "Description": "Operations for the ModelWithAttributes type.", - "Operations": [ - { - "$id": "173", - "Name": "get", - "ResourceName": "ModelWithAttributesValue", - "Accessibility": "public", - "Parameters": [ - { - "$id": "174", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "175", - "kind": "constant", - "valueType": { - "$id": "176", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/xml", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "177", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "60" - }, - "BodyMediaType": "Json", - "Headers": [ - { - "$id": "178", - "Name": "contentType", - "NameInResponse": "content-type", - "Type": { - "$id": "179", - "kind": "constant", - "valueType": { - "$id": "180", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/xml", - "decorators": [] - } - } - ], - "IsErrorResponse": false, - "ContentTypes": [ - "application/xml" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/payload/xml/modelWithAttributes", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "Payload.Xml.ModelWithAttributesValue.get", - "Decorators": [] - }, - { - "$id": "181", - "Name": "put", - "ResourceName": "ModelWithAttributesValue", - "Accessibility": "public", - "Parameters": [ - { - "$id": "182", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Type": { - "$id": "183", - "kind": "constant", - "valueType": { - "$id": "184", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/xml", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "185", - "Name": "input", - "NameInRequest": "input", - "Type": { - "$ref": "60" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "186", - "StatusCodes": [ - 204 - ], - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false - } - ], - "HttpMethod": "PUT", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/payload/xml/modelWithAttributes", - "RequestMediaTypes": [ - "application/xml" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "Payload.Xml.ModelWithAttributesValue.put", - "Decorators": [] - } - ], - "Protocol": { - "$id": "187" - }, - "Parent": "XmlClient", - "Parameters": [ - { - "$id": "188", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "189", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "190", - "Type": { - "$id": "191", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "http://localhost:3000" - } - } - ], - "Decorators": [] - }, - { - "$id": "192", - "Name": "ModelWithUnwrappedArrayValue", - "Description": "Operations for the ModelWithUnwrappedArray type.", - "Operations": [ - { - "$id": "193", - "Name": "get", - "ResourceName": "ModelWithUnwrappedArrayValue", - "Accessibility": "public", - "Parameters": [ - { - "$id": "194", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "195", - "kind": "constant", - "valueType": { - "$id": "196", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/xml", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "197", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "51" - }, - "BodyMediaType": "Json", - "Headers": [ - { - "$id": "198", - "Name": "contentType", - "NameInResponse": "content-type", - "Type": { - "$id": "199", - "kind": "constant", - "valueType": { - "$id": "200", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/xml", - "decorators": [] - } - } - ], - "IsErrorResponse": false, - "ContentTypes": [ - "application/xml" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/payload/xml/modelWithUnwrappedArray", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "Payload.Xml.ModelWithUnwrappedArrayValue.get", - "Decorators": [] - }, - { - "$id": "201", - "Name": "put", - "ResourceName": "ModelWithUnwrappedArrayValue", - "Accessibility": "public", - "Parameters": [ - { - "$id": "202", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Type": { - "$id": "203", - "kind": "constant", - "valueType": { - "$id": "204", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/xml", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "205", - "Name": "input", - "NameInRequest": "input", - "Type": { - "$ref": "51" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "206", - "StatusCodes": [ - 204 - ], - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false - } - ], - "HttpMethod": "PUT", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/payload/xml/modelWithUnwrappedArray", - "RequestMediaTypes": [ - "application/xml" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "Payload.Xml.ModelWithUnwrappedArrayValue.put", - "Decorators": [] - } - ], - "Protocol": { - "$id": "207" - }, - "Parent": "XmlClient", - "Parameters": [ - { - "$id": "208", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "209", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "210", - "Type": { - "$id": "211", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "http://localhost:3000" - } - } - ], - "Decorators": [] - }, - { - "$id": "212", - "Name": "ModelWithRenamedArraysValue", - "Description": "Operations for the ModelWithRenamedArrays type.", - "Operations": [ - { - "$id": "213", - "Name": "get", - "ResourceName": "ModelWithRenamedArraysValue", - "Accessibility": "public", - "Parameters": [ - { - "$id": "214", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "215", - "kind": "constant", - "valueType": { - "$id": "216", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/xml", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "217", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "38" - }, - "BodyMediaType": "Json", - "Headers": [ - { - "$id": "218", - "Name": "contentType", - "NameInResponse": "content-type", - "Type": { - "$id": "219", - "kind": "constant", - "valueType": { - "$id": "220", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/xml", - "decorators": [] - } - } - ], - "IsErrorResponse": false, - "ContentTypes": [ - "application/xml" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/payload/xml/modelWithRenamedArrays", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "Payload.Xml.ModelWithRenamedArraysValue.get", - "Decorators": [] - }, - { - "$id": "221", - "Name": "put", - "ResourceName": "ModelWithRenamedArraysValue", - "Accessibility": "public", - "Parameters": [ - { - "$id": "222", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Type": { - "$id": "223", - "kind": "constant", - "valueType": { - "$id": "224", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/xml", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "225", - "Name": "input", - "NameInRequest": "input", - "Type": { - "$ref": "38" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "226", - "StatusCodes": [ - 204 - ], - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false - } - ], - "HttpMethod": "PUT", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/payload/xml/modelWithRenamedArrays", - "RequestMediaTypes": [ - "application/xml" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "Payload.Xml.ModelWithRenamedArraysValue.put", - "Decorators": [] - } - ], - "Protocol": { - "$id": "227" - }, - "Parent": "XmlClient", - "Parameters": [ - { - "$id": "228", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "229", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "230", - "Type": { - "$id": "231", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "http://localhost:3000" - } - } - ], - "Decorators": [] - }, - { - "$id": "232", - "Name": "ModelWithRenamedFieldsValue", - "Description": "Operations for the ModelWithRenamedFields type.", - "Operations": [ - { - "$id": "233", - "Name": "get", - "ResourceName": "ModelWithRenamedFieldsValue", - "Accessibility": "public", - "Parameters": [ - { - "$id": "234", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "235", - "kind": "constant", - "valueType": { - "$id": "236", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/xml", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "237", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "29" - }, - "BodyMediaType": "Json", - "Headers": [ - { - "$id": "238", - "Name": "contentType", - "NameInResponse": "content-type", - "Type": { - "$id": "239", - "kind": "constant", - "valueType": { - "$id": "240", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/xml", - "decorators": [] - } - } - ], - "IsErrorResponse": false, - "ContentTypes": [ - "application/xml" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/payload/xml/modelWithRenamedFields", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "Payload.Xml.ModelWithRenamedFieldsValue.get", - "Decorators": [] - }, - { - "$id": "241", - "Name": "put", - "ResourceName": "ModelWithRenamedFieldsValue", - "Accessibility": "public", - "Parameters": [ - { - "$id": "242", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Type": { - "$id": "243", - "kind": "constant", - "valueType": { - "$id": "244", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/xml", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "245", - "Name": "input", - "NameInRequest": "input", - "Type": { - "$ref": "29" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "246", - "StatusCodes": [ - 204 - ], - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false - } - ], - "HttpMethod": "PUT", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/payload/xml/modelWithRenamedFields", - "RequestMediaTypes": [ - "application/xml" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "Payload.Xml.ModelWithRenamedFieldsValue.put", - "Decorators": [] - } - ], - "Protocol": { - "$id": "247" - }, - "Parent": "XmlClient", - "Parameters": [ - { - "$id": "248", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "249", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "250", - "Type": { - "$id": "251", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "http://localhost:3000" - } - } - ], - "Decorators": [] - }, - { - "$id": "252", - "Name": "ModelWithEmptyArrayValue", - "Description": "Operations for the ModelWithEmptyArray type.", - "Operations": [ - { - "$id": "253", - "Name": "get", - "ResourceName": "ModelWithEmptyArrayValue", - "Accessibility": "public", - "Parameters": [ - { - "$id": "254", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "255", - "kind": "constant", - "valueType": { - "$id": "256", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/xml", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "257", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "26" - }, - "BodyMediaType": "Json", - "Headers": [ - { - "$id": "258", - "Name": "contentType", - "NameInResponse": "content-type", - "Type": { - "$id": "259", - "kind": "constant", - "valueType": { - "$id": "260", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/xml", - "decorators": [] - } - } - ], - "IsErrorResponse": false, - "ContentTypes": [ - "application/xml" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/payload/xml/modelWithEmptyArray", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "Payload.Xml.ModelWithEmptyArrayValue.get", - "Decorators": [] - }, - { - "$id": "261", - "Name": "put", - "ResourceName": "ModelWithEmptyArrayValue", - "Accessibility": "public", - "Parameters": [ - { - "$id": "262", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Type": { - "$id": "263", - "kind": "constant", - "valueType": { - "$id": "264", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/xml", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "265", - "Name": "input", - "NameInRequest": "input", - "Type": { - "$ref": "26" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "266", - "StatusCodes": [ - 204 - ], - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false - } - ], - "HttpMethod": "PUT", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/payload/xml/modelWithEmptyArray", - "RequestMediaTypes": [ - "application/xml" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "Payload.Xml.ModelWithEmptyArrayValue.put", - "Decorators": [] - } - ], - "Protocol": { - "$id": "267" - }, - "Parent": "XmlClient", - "Parameters": [ - { - "$id": "268", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "269", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "270", - "Type": { - "$id": "271", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "http://localhost:3000" - } - } - ], - "Decorators": [] - }, - { - "$id": "272", - "Name": "ModelWithTextValue", - "Description": "Operations for the ModelWithText type.", - "Operations": [ - { - "$id": "273", - "Name": "get", - "ResourceName": "ModelWithTextValue", - "Accessibility": "public", - "Parameters": [ - { - "$id": "274", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "275", - "kind": "constant", - "valueType": { - "$id": "276", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/xml", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "277", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "17" - }, - "BodyMediaType": "Json", - "Headers": [ - { - "$id": "278", - "Name": "contentType", - "NameInResponse": "content-type", - "Type": { - "$id": "279", - "kind": "constant", - "valueType": { - "$id": "280", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/xml", - "decorators": [] - } - } - ], - "IsErrorResponse": false, - "ContentTypes": [ - "application/xml" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/payload/xml/modelWithText", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "Payload.Xml.ModelWithTextValue.get", - "Decorators": [] - }, - { - "$id": "281", - "Name": "put", - "ResourceName": "ModelWithTextValue", - "Accessibility": "public", - "Parameters": [ - { - "$id": "282", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Type": { - "$id": "283", - "kind": "constant", - "valueType": { - "$id": "284", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/xml", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "285", - "Name": "input", - "NameInRequest": "input", - "Type": { - "$ref": "17" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "286", - "StatusCodes": [ - 204 - ], - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false - } - ], - "HttpMethod": "PUT", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/payload/xml/modelWithText", - "RequestMediaTypes": [ - "application/xml" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "Payload.Xml.ModelWithTextValue.put", - "Decorators": [] - } - ], - "Protocol": { - "$id": "287" - }, - "Parent": "XmlClient", - "Parameters": [ - { - "$id": "288", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "289", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "290", - "Type": { - "$id": "291", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "http://localhost:3000" - } - } - ], - "Decorators": [] - }, - { - "$id": "292", - "Name": "ModelWithDictionaryValue", - "Description": "Operations for the ModelWithDictionary type.", - "Operations": [ - { - "$id": "293", - "Name": "get", - "ResourceName": "ModelWithDictionaryValue", - "Accessibility": "public", - "Parameters": [ - { - "$id": "294", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "295", - "kind": "constant", - "valueType": { - "$id": "296", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/xml", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "297", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "12" - }, - "BodyMediaType": "Json", - "Headers": [ - { - "$id": "298", - "Name": "contentType", - "NameInResponse": "content-type", - "Type": { - "$id": "299", - "kind": "constant", - "valueType": { - "$id": "300", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/xml", - "decorators": [] - } - } - ], - "IsErrorResponse": false, - "ContentTypes": [ - "application/xml" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/payload/xml/modelWithDictionary", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "Payload.Xml.ModelWithDictionaryValue.get", - "Decorators": [] - }, - { - "$id": "301", - "Name": "put", - "ResourceName": "ModelWithDictionaryValue", - "Accessibility": "public", - "Parameters": [ - { - "$id": "302", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Type": { - "$id": "303", - "kind": "constant", - "valueType": { - "$id": "304", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/xml", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "305", - "Name": "input", - "NameInRequest": "input", - "Type": { - "$ref": "12" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "306", - "StatusCodes": [ - 204 - ], - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false - } - ], - "HttpMethod": "PUT", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/payload/xml/modelWithDictionary", - "RequestMediaTypes": [ - "application/xml" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "Payload.Xml.ModelWithDictionaryValue.put", - "Decorators": [] - } - ], - "Protocol": { - "$id": "307" - }, - "Parent": "XmlClient", - "Parameters": [ - { - "$id": "308", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "309", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "310", - "Type": { - "$id": "311", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "http://localhost:3000" - } - } - ], - "Decorators": [] - }, - { - "$id": "312", - "Name": "ModelWithEncodedNamesValue", - "Description": "Operations for the ModelWithEncodedNames type.", - "Operations": [ - { - "$id": "313", - "Name": "get", - "ResourceName": "ModelWithEncodedNamesValue", - "Accessibility": "public", - "Parameters": [ - { - "$id": "314", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "315", - "kind": "constant", - "valueType": { - "$id": "316", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/xml", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "317", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "2" - }, - "BodyMediaType": "Json", - "Headers": [ - { - "$id": "318", - "Name": "contentType", - "NameInResponse": "content-type", - "Type": { - "$id": "319", - "kind": "constant", - "valueType": { - "$id": "320", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/xml", - "decorators": [] - } - } - ], - "IsErrorResponse": false, - "ContentTypes": [ - "application/xml" - ] - } - ], - "HttpMethod": "GET", - "RequestBodyMediaType": "None", - "Uri": "{endpoint}", - "Path": "/payload/xml/modelWithEncodedNames", - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "Payload.Xml.ModelWithEncodedNamesValue.get", - "Decorators": [] - }, - { - "$id": "321", - "Name": "put", - "ResourceName": "ModelWithEncodedNamesValue", - "Accessibility": "public", - "Parameters": [ - { - "$id": "322", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Type": { - "$id": "323", - "kind": "constant", - "valueType": { - "$id": "324", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/xml", - "decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [], - "SkipUrlEncoding": false - }, - { - "$id": "325", - "Name": "input", - "NameInRequest": "input", - "Type": { - "$ref": "2" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [], - "SkipUrlEncoding": false - } - ], - "Responses": [ - { - "$id": "326", - "StatusCodes": [ - 204 - ], - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false - } - ], - "HttpMethod": "PUT", - "RequestBodyMediaType": "Json", - "Uri": "{endpoint}", - "Path": "/payload/xml/modelWithEncodedNames", - "RequestMediaTypes": [ - "application/xml" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "Payload.Xml.ModelWithEncodedNamesValue.put", - "Decorators": [] - } - ], - "Protocol": { - "$id": "327" - }, - "Parent": "XmlClient", - "Parameters": [ - { - "$id": "328", - "Name": "endpoint", - "NameInRequest": "endpoint", - "Description": "Service host", - "Type": { - "$id": "329", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "Location": "Uri", - "IsApiVersion": false, - "IsResourceParameter": false, - "IsContentType": false, - "IsRequired": true, - "IsEndpoint": true, - "SkipUrlEncoding": false, - "Explode": false, - "Kind": "Client", - "DefaultValue": { - "$id": "330", - "Type": { - "$id": "331", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "Value": "http://localhost:3000" - } - } - ], - "Decorators": [] - } - ] -} diff --git a/packages/http-client-java/generator/http-client-generator-core/src/main/java/com/microsoft/typespec/http/client/generator/core/template/ClientMethodTemplateBase.java b/packages/http-client-java/generator/http-client-generator-core/src/main/java/com/microsoft/typespec/http/client/generator/core/template/ClientMethodTemplateBase.java index a64f72c7db..ecd24a326e 100644 --- a/packages/http-client-java/generator/http-client-generator-core/src/main/java/com/microsoft/typespec/http/client/generator/core/template/ClientMethodTemplateBase.java +++ b/packages/http-client-java/generator/http-client-generator-core/src/main/java/com/microsoft/typespec/http/client/generator/core/template/ClientMethodTemplateBase.java @@ -9,7 +9,6 @@ import com.microsoft.typespec.http.client.generator.core.model.clientmodel.ClassType; import com.microsoft.typespec.http.client.generator.core.model.clientmodel.ClientEnumValue; import com.microsoft.typespec.http.client.generator.core.model.clientmodel.ClientMethod; -import com.microsoft.typespec.http.client.generator.core.model.clientmodel.ClientMethodParameter; import com.microsoft.typespec.http.client.generator.core.model.clientmodel.ClientModel; import com.microsoft.typespec.http.client.generator.core.model.clientmodel.ClientModelProperty; import com.microsoft.typespec.http.client.generator.core.model.clientmodel.EnumType; @@ -25,6 +24,7 @@ import com.microsoft.typespec.http.client.generator.core.model.javamodel.JavaType; import com.microsoft.typespec.http.client.generator.core.util.ClientModelUtil; import com.microsoft.typespec.http.client.generator.core.util.CodeNamer; +import com.microsoft.typespec.http.client.generator.core.util.MethodUtil; import java.util.HashSet; import java.util.LinkedHashMap; import java.util.List; @@ -136,7 +136,7 @@ protected static void generateProtocolMethodJavadoc(ClientMethod clientMethod, J } clientMethod.getParameters() - .forEach(p -> commentBlock.param(p.getName(), methodParameterDescriptionOrDefault(p))); + .forEach(p -> commentBlock.param(p.getName(), MethodUtil.methodParameterDescriptionOrDefault(p))); if (clientMethod.getProxyMethod() != null) { generateJavadocExceptions(clientMethod, commentBlock, false); } @@ -353,14 +353,6 @@ private static String parameterDescriptionOrDefault(ProxyMethodParameter paramet return description; } - private static String methodParameterDescriptionOrDefault(ClientMethodParameter p) { - String doc = p.getDescription(); - if (CoreUtils.isNullOrEmpty(doc)) { - doc = String.format("The %1$s parameter", p.getName()); - } - return doc; - } - private static String appendOptionalOrRequiredAttribute(boolean isRequired, boolean isRequiredForCreate, boolean isRootSchema) { if (isRootSchema) { diff --git a/packages/http-client-java/generator/http-client-generator-core/src/main/java/com/microsoft/typespec/http/client/generator/core/template/ServiceAsyncClientTemplate.java b/packages/http-client-java/generator/http-client-generator-core/src/main/java/com/microsoft/typespec/http/client/generator/core/template/ServiceAsyncClientTemplate.java index f705fba329..ef10d3853f 100644 --- a/packages/http-client-java/generator/http-client-generator-core/src/main/java/com/microsoft/typespec/http/client/generator/core/template/ServiceAsyncClientTemplate.java +++ b/packages/http-client-java/generator/http-client-generator-core/src/main/java/com/microsoft/typespec/http/client/generator/core/template/ServiceAsyncClientTemplate.java @@ -23,6 +23,7 @@ import com.microsoft.typespec.http.client.generator.core.model.javamodel.JavaFile; import com.microsoft.typespec.http.client.generator.core.model.javamodel.JavaVisibility; import com.microsoft.typespec.http.client.generator.core.util.ClientModelUtil; +import com.microsoft.typespec.http.client.generator.core.util.MethodUtil; import com.microsoft.typespec.http.client.generator.core.util.ModelNamer; import com.microsoft.typespec.http.client.generator.core.util.TemplateUtil; import java.util.HashSet; @@ -241,7 +242,7 @@ static void writeSubClientAccessors(ServiceClient serviceClient, JavaClass class classBlock.javadocComment(comment -> { comment.description("Gets an instance of " + subClientClassName + " class."); for (ClientMethodParameter property : methodParameters) { - comment.param(property.getName(), property.getDescription()); + comment.param(property.getName(), MethodUtil.methodParameterDescriptionOrDefault(property)); } comment.methodReturns("an instance of " + subClientClassName + "class"); }); diff --git a/packages/http-client-java/generator/http-client-generator-core/src/main/java/com/microsoft/typespec/http/client/generator/core/template/ServiceClientTemplate.java b/packages/http-client-java/generator/http-client-generator-core/src/main/java/com/microsoft/typespec/http/client/generator/core/template/ServiceClientTemplate.java index 0cfc5529e9..7a2895d282 100644 --- a/packages/http-client-java/generator/http-client-generator-core/src/main/java/com/microsoft/typespec/http/client/generator/core/template/ServiceClientTemplate.java +++ b/packages/http-client-java/generator/http-client-generator-core/src/main/java/com/microsoft/typespec/http/client/generator/core/template/ServiceClientTemplate.java @@ -19,6 +19,7 @@ import com.microsoft.typespec.http.client.generator.core.template.prototype.MethodTemplate; import com.microsoft.typespec.http.client.generator.core.util.ClientModelUtil; import com.microsoft.typespec.http.client.generator.core.util.CodeNamer; +import com.microsoft.typespec.http.client.generator.core.util.MethodUtil; import com.microsoft.typespec.http.client.generator.core.util.ModelNamer; import com.microsoft.typespec.http.client.generator.core.util.TemplateUtil; import java.util.ArrayList; @@ -386,7 +387,7 @@ private static void writeClientAccessorMethods(JavaClass classBlock, classBlock.javadocComment(comment -> { comment.description("Gets an instance of " + subClientName + " class."); for (ClientMethodParameter parameter : methodParameters) { - comment.param(parameter.getName(), parameter.getDescription()); + comment.param(parameter.getName(), MethodUtil.methodParameterDescriptionOrDefault(parameter)); } comment.methodReturns("an instance of " + subClientName + "class"); }); diff --git a/packages/http-client-java/generator/http-client-generator-core/src/main/java/com/microsoft/typespec/http/client/generator/core/util/MethodUtil.java b/packages/http-client-java/generator/http-client-generator-core/src/main/java/com/microsoft/typespec/http/client/generator/core/util/MethodUtil.java index 8a9e82b252..a969e90168 100644 --- a/packages/http-client-java/generator/http-client-generator-core/src/main/java/com/microsoft/typespec/http/client/generator/core/util/MethodUtil.java +++ b/packages/http-client-java/generator/http-client-generator-core/src/main/java/com/microsoft/typespec/http/client/generator/core/util/MethodUtil.java @@ -23,6 +23,7 @@ import com.microsoft.typespec.http.client.generator.core.model.clientmodel.ClassType; import com.microsoft.typespec.http.client.generator.core.model.clientmodel.ClientEnumValue; import com.microsoft.typespec.http.client.generator.core.model.clientmodel.ClientMethod; +import com.microsoft.typespec.http.client.generator.core.model.clientmodel.ClientMethodParameter; import com.microsoft.typespec.http.client.generator.core.model.clientmodel.EnumType; import com.microsoft.typespec.http.client.generator.core.model.clientmodel.IType; import com.microsoft.typespec.http.client.generator.core.model.clientmodel.ProxyMethod; @@ -326,6 +327,20 @@ public static Optional serializedNameOfMaxPageSizeParameter(ProxyMethod .findFirst(); } + /** + * Gets method parameter description, or a default description if not exists. + * + * @param p the client method parameter + * @return the method parameter description + */ + public static String methodParameterDescriptionOrDefault(ClientMethodParameter p) { + String doc = p.getDescription(); + if (CoreUtils.isNullOrEmpty(doc)) { + doc = String.format("The %1$s parameter", p.getName()); + } + return doc; + } + /** * * @param request the input request diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/tsptest/clientinitialization/ClientInitializationAsyncClient.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/tsptest/clientinitialization/ClientInitializationAsyncClient.java index 051373763a..900212ff45 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/tsptest/clientinitialization/ClientInitializationAsyncClient.java +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/tsptest/clientinitialization/ClientInitializationAsyncClient.java @@ -29,7 +29,7 @@ public final class ClientInitializationAsyncClient { /** * Gets an instance of SubAsyncClient class. * - * @param name + * @param name The name parameter. * @return an instance of SubAsyncClientclass. */ public SubAsyncClient getSubAsyncClient(String name) { diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/tsptest/clientinitialization/ClientInitializationClient.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/tsptest/clientinitialization/ClientInitializationClient.java index 02ac901b5e..705ea2577b 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/tsptest/clientinitialization/ClientInitializationClient.java +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/tsptest/clientinitialization/ClientInitializationClient.java @@ -29,7 +29,7 @@ public final class ClientInitializationClient { /** * Gets an instance of SubClient class. * - * @param name + * @param name The name parameter. * @return an instance of SubClientclass. */ public SubClient getSubClient(String name) { diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/tsptest/clientinitialization/implementation/ClientInitializationClientImpl.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/tsptest/clientinitialization/implementation/ClientInitializationClientImpl.java index 3bd2efbe5c..52de55218f 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/tsptest/clientinitialization/implementation/ClientInitializationClientImpl.java +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/tsptest/clientinitialization/implementation/ClientInitializationClientImpl.java @@ -95,7 +95,7 @@ public ClientInitializationClientImpl(HttpPipeline httpPipeline, SerializerAdapt /** * Gets an instance of SubClientImpl class. * - * @param name + * @param name The name parameter. * @return an instance of SubClientImplclass. */ public SubClientImpl getSubClient(String name) { diff --git a/packages/http-client-python/eng/scripts/Build-Packages.ps1 b/packages/http-client-python/eng/scripts/Build-Packages.ps1 index f4601edb32..2044c5a6df 100644 --- a/packages/http-client-python/eng/scripts/Build-Packages.ps1 +++ b/packages/http-client-python/eng/scripts/Build-Packages.ps1 @@ -57,6 +57,9 @@ try { Invoke-LoggedCommand "npm run build" -GroupOutput + Write-Host "run lint check for pygen" + Invoke-LoggedCommand "npm run lint:py" -GroupOutput + # pack the emitter Invoke-LoggedCommand "npm pack" Copy-Item "typespec-http-client-python-$emitterVersion.tgz" -Destination "$outputPath/packages" diff --git a/packages/http-client-python/eng/scripts/ci/utils.ts b/packages/http-client-python/eng/scripts/ci/utils.ts index 3c3bc83e17..2beb167fb3 100644 --- a/packages/http-client-python/eng/scripts/ci/utils.ts +++ b/packages/http-client-python/eng/scripts/ci/utils.ts @@ -11,6 +11,8 @@ const argv = parseArgs({ args: process.argv.slice(2), options: { pythonPath: { type: "string" }, + folderName: { type: "string" }, + command: { type: "string" }, }, }); diff --git a/packages/http-client-python/generator/pygen/black.py b/packages/http-client-python/generator/pygen/black.py index f8fd58b223..39dee18947 100644 --- a/packages/http-client-python/generator/pygen/black.py +++ b/packages/http-client-python/generator/pygen/black.py @@ -51,6 +51,7 @@ def process(self) -> bool: return True def format_file(self, file: Path) -> None: + file_content = "" try: file_content = self.read_file(file) file_content = black.format_file_contents(file_content, fast=True, mode=_BLACK_MODE) diff --git a/packages/http-client-python/generator/pygen/codegen/__init__.py b/packages/http-client-python/generator/pygen/codegen/__init__.py index 1ab9bd6237..8a08e8e6a2 100644 --- a/packages/http-client-python/generator/pygen/codegen/__init__.py +++ b/packages/http-client-python/generator/pygen/codegen/__init__.py @@ -249,8 +249,15 @@ def sort_exceptions(yaml_data: Dict[str, Any]) -> None: if not operation.get("exceptions"): continue # sort exceptions by status code, first single status code, then range, then default - operation["exceptions"] = sorted(operation["exceptions"], key=lambda x: 3 if x["statusCodes"][0] == "default" else (1 if isinstance(x["statusCodes"][0], int) else 2)) - + operation["exceptions"] = sorted( + operation["exceptions"], + key=lambda x: ( + 3 + if x["statusCodes"][0] == "default" + else (1 if isinstance(x["statusCodes"][0], int) else 2) + ), + ) + @staticmethod def remove_cloud_errors(yaml_data: Dict[str, Any]) -> None: for client in yaml_data["clients"]: @@ -325,7 +332,7 @@ def process(self) -> bool: self._validate_code_model_options() options = self._build_code_model_options() yaml_data = self.get_yaml() - + self.sort_exceptions(yaml_data) if self.options_retriever.azure_arm: diff --git a/packages/http-client-python/generator/pygen/codegen/models/lro_paging_operation.py b/packages/http-client-python/generator/pygen/codegen/models/lro_paging_operation.py index 326ed2aac9..ae6cd4936b 100644 --- a/packages/http-client-python/generator/pygen/codegen/models/lro_paging_operation.py +++ b/packages/http-client-python/generator/pygen/codegen/models/lro_paging_operation.py @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- -from typing import Any +from typing import Any, List, Union from .imports import FileImport from .lro_operation import LROOperationBase from .paging_operation import PagingOperationBase @@ -12,7 +12,7 @@ class LROPagingOperation(LROOperationBase[LROPagingResponse], PagingOperationBase[LROPagingResponse]): @property - def success_status_codes(self): + def success_status_codes(self) -> List[Union[int, str, List[int]]]: """The list of all successfull status code.""" return [200] diff --git a/packages/http-client-python/generator/pygen/codegen/models/operation.py b/packages/http-client-python/generator/pygen/codegen/models/operation.py index 22aed0fdb2..78e9b2d8dc 100644 --- a/packages/http-client-python/generator/pygen/codegen/models/operation.py +++ b/packages/http-client-python/generator/pygen/codegen/models/operation.py @@ -3,19 +3,16 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- -from itertools import chain from typing import ( Dict, List, Any, Optional, - Tuple, Union, TYPE_CHECKING, Generic, TypeVar, cast, - Sequence, ) from .request_builder_parameter import RequestBuilderParameter @@ -206,7 +203,9 @@ def default_error_deserialization(self) -> Optional[str]: @property def non_default_errors(self) -> List[Response]: - return [e for e in self.exceptions if "default" not in e.status_codes and e.type and isinstance(e.type, ModelType)] + return [ + e for e in self.exceptions if "default" not in e.status_codes and e.type and isinstance(e.type, ModelType) + ] def _imports_shared(self, async_mode: bool, **kwargs: Any) -> FileImport: # pylint: disable=unused-argument file_import = FileImport(self.code_model) @@ -419,7 +418,9 @@ def imports( # pylint: disable=too-many-branches, disable=too-many-statements elif any(r.type for r in self.responses): file_import.add_submodule_import(f"{relative_path}_model_base", "_deserialize", ImportType.LOCAL) if self.default_error_deserialization or self.non_default_errors: - file_import.add_submodule_import(f"{relative_path}_model_base", "_failsafe_deserialize", ImportType.LOCAL) + file_import.add_submodule_import( + f"{relative_path}_model_base", "_failsafe_deserialize", ImportType.LOCAL + ) return file_import def get_response_from_status(self, status_code: Optional[Union[str, int]]) -> ResponseType: @@ -429,7 +430,7 @@ def get_response_from_status(self, status_code: Optional[Union[str, int]]) -> Re raise ValueError(f"Incorrect status code {status_code}, operation {self.name}") from exc @property - def success_status_codes(self) -> Sequence[Union[str, int]]: + def success_status_codes(self) -> List[Union[int, str, List[int]]]: """The list of all successfull status code.""" return sorted([code for response in self.responses for code in response.status_codes]) diff --git a/packages/http-client-python/generator/pygen/codegen/serializers/builder_serializer.py b/packages/http-client-python/generator/pygen/codegen/serializers/builder_serializer.py index 34924397e1..2293b5e6b4 100644 --- a/packages/http-client-python/generator/pygen/codegen/serializers/builder_serializer.py +++ b/packages/http-client-python/generator/pygen/codegen/serializers/builder_serializer.py @@ -991,9 +991,7 @@ def handle_error_response(self, builder: OperationType) -> List[str]: elif isinstance(builder.stream_value, str): # _stream is not sure, so we need to judge it retval.append(" if _stream:") retval.extend([f" {l}" for l in response_read]) - retval.append( - f" map_error(status_code=response.status_code, response=response, error_map=error_map)" - ) + retval.append(" map_error(status_code=response.status_code, response=response, error_map=error_map)") error_model = "" if builder.non_default_errors and self.code_model.options["models_mode"]: error_model = ", model=error" @@ -1005,10 +1003,10 @@ def handle_error_response(self, builder: OperationType) -> List[str]: for status_code in e.status_codes: retval.append(f" {condition} response.status_code == {status_code}:") if self.code_model.options["models_mode"] == "dpg": - retval.append(f" error = _failsafe_deserialize({e.type.type_annotation(is_operation_file=True, skip_quote=True)}, response.json())") + retval.append(f" error = _failsafe_deserialize({e.type.type_annotation(is_operation_file=True, skip_quote=True)}, response.json())") # type: ignore # pylint: disable=line-too-long else: retval.append( - f" error = self._deserialize.failsafe_deserialize({e.type.type_annotation(is_operation_file=True, skip_quote=True)}, " + f" error = self._deserialize.failsafe_deserialize({e.type.type_annotation(is_operation_file=True, skip_quote=True)}, " # type: ignore # pylint: disable=line-too-long "pipeline_response)" ) # add build-in error type @@ -1043,12 +1041,14 @@ def handle_error_response(self, builder: OperationType) -> List[str]: ) # ranged status code only exist in typespec and will not have multiple status codes else: - retval.append(f" {condition} {e.status_codes[0][0]} <= response.status_code <= {e.status_codes[0][1]}:") + retval.append( + f" {condition} {e.status_codes[0][0]} <= response.status_code <= {e.status_codes[0][1]}:" + ) if self.code_model.options["models_mode"] == "dpg": - retval.append(f" error = _failsafe_deserialize({e.type.type_annotation(is_operation_file=True, skip_quote=True)}, response.json())") + retval.append(f" error = _failsafe_deserialize({e.type.type_annotation(is_operation_file=True, skip_quote=True)}, response.json())") # type: ignore # pylint: disable=line-too-long else: retval.append( - f" error = self._deserialize.failsafe_deserialize({e.type.type_annotation(is_operation_file=True, skip_quote=True)}, " + f" error = self._deserialize.failsafe_deserialize({e.type.type_annotation(is_operation_file=True, skip_quote=True)}, " # type: ignore # pylint: disable=line-too-long "pipeline_response)" ) condition = "elif" @@ -1059,7 +1059,9 @@ def handle_error_response(self, builder: OperationType) -> List[str]: if builder.non_default_errors: retval.append(" else:") if self.code_model.options["models_mode"] == "dpg": - retval.append(f"{indent}error = _failsafe_deserialize({builder.default_error_deserialization}, response.json())") + retval.append( + f"{indent}error = _failsafe_deserialize({builder.default_error_deserialization}, response.json())" + ) else: retval.append( f"{indent}error = self._deserialize.failsafe_deserialize({builder.default_error_deserialization}, " @@ -1086,7 +1088,7 @@ def handle_response(self, builder: OperationType) -> List[str]: if len(builder.responses) > 1: status_codes, res_headers, res_deserialization = [], [], [] for status_code in builder.success_status_codes: - response = builder.get_response_from_status(status_code) + response = builder.get_response_from_status(status_code) # type: ignore if response.headers or response.type: status_codes.append(status_code) res_headers.append(self.response_headers(response)) @@ -1143,10 +1145,13 @@ def _need_specific_error_map(self, code: int, builder: OperationType) -> bool: if code in non_default_error.status_codes: return False # ranged status code - if isinstance(non_default_error.status_codes[0], list) and non_default_error.status_codes[0][0] <= code <= non_default_error.status_codes[0][1]: + if ( + isinstance(non_default_error.status_codes[0], list) + and non_default_error.status_codes[0][0] <= code <= non_default_error.status_codes[0][1] + ): return False return True - + def error_map(self, builder: OperationType) -> List[str]: retval = ["error_map: MutableMapping = {"] if builder.non_default_errors and self.code_model.options["models_mode"]: diff --git a/packages/http-client-python/generator/test/azure/mock_api_tests/asynctests/test_azure_arm_resource_async.py b/packages/http-client-python/generator/test/azure/mock_api_tests/asynctests/test_azure_arm_resource_async.py index 1e8fbe0213..abf03c911c 100644 --- a/packages/http-client-python/generator/test/azure/mock_api_tests/asynctests/test_azure_arm_resource_async.py +++ b/packages/http-client-python/generator/test/azure/mock_api_tests/asynctests/test_azure_arm_resource_async.py @@ -36,9 +36,7 @@ async def test_client_signature(credential, authentication_policy): # make sure signautre order is correct await client.top_level.get(RESOURCE_GROUP_NAME, "top") # make sure signautre name is correct - await client.top_level.get( - resource_group_name=RESOURCE_GROUP_NAME, top_level_tracked_resource_name="top" - ) + await client.top_level.get(resource_group_name=RESOURCE_GROUP_NAME, top_level_tracked_resource_name="top") @pytest.mark.asyncio diff --git a/packages/http-client-python/generator/test/azure/mock_api_tests/test_azure_arm_resource.py b/packages/http-client-python/generator/test/azure/mock_api_tests/test_azure_arm_resource.py index d79bc05168..ecc550477e 100644 --- a/packages/http-client-python/generator/test/azure/mock_api_tests/test_azure_arm_resource.py +++ b/packages/http-client-python/generator/test/azure/mock_api_tests/test_azure_arm_resource.py @@ -35,9 +35,7 @@ def test_client_signature(credential, authentication_policy): # make sure signautre order is correct client.top_level.get(RESOURCE_GROUP_NAME, "top") # make sure signautre name is correct - client.top_level.get( - resource_group_name=RESOURCE_GROUP_NAME, top_level_tracked_resource_name="top" - ) + client.top_level.get(resource_group_name=RESOURCE_GROUP_NAME, top_level_tracked_resource_name="top") def test_top_level_begin_create_or_replace(client): diff --git a/packages/http-client-python/package.json b/packages/http-client-python/package.json index 94ebdc2c53..a0aa6378bf 100644 --- a/packages/http-client-python/package.json +++ b/packages/http-client-python/package.json @@ -33,7 +33,7 @@ "build": "tsc -p ./emitter/tsconfig.build.json", "watch": "tsc -p ./emitter/tsconfig.build.json --watch", "lint": "eslint . --max-warnings=0", - "lint:py": "tsx ./eng/scripts/ci/lint.ts --folderName generator", + "lint:py": "tsx ./eng/scripts/ci/lint.ts --folderName generator/pygen", "format": "pnpm -w format:dir packages/http-client-python && tsx ./eng/scripts/ci/format.ts", "install": "tsx ./eng/scripts/setup/run-python3.ts ./eng/scripts/setup/install.py", "prepare": "tsx ./eng/scripts/setup/run-python3.ts ./eng/scripts/setup/prepare.py", diff --git a/packages/http-server-csharp/CHANGELOG.md b/packages/http-server-csharp/CHANGELOG.md index 355f070d67..e56af66ddf 100644 --- a/packages/http-server-csharp/CHANGELOG.md +++ b/packages/http-server-csharp/CHANGELOG.md @@ -1,5 +1,19 @@ # Change Log - @typespec/http-server-csharp +## 0.58.0-alpha.6 + +### Bug Fixes + +- [#5140](https://github.com/microsoft/typespec/pull/5140) Fix #4308 Process sub-namespace of a service in csharp service emitter +Fix #4998 Generator throws on void return type +Fix #5000 Tuple types are not properly generated +Fix #5001 OkResponse is generated as a model +Fix #5024 Literal type is not properly generated +Fix #5124 Templated model reported error while generating +Fix #5125 No interfaces and controllers are generated for ops in a namespace +- [#5279](https://github.com/microsoft/typespec/pull/5279) Fix nullable types, anonymous types, and safeInt + + ## 0.58.0-alpha.5 ### Bump dependencies diff --git a/packages/http-server-csharp/package.json b/packages/http-server-csharp/package.json index 207e92b6c1..d7fbe5f909 100644 --- a/packages/http-server-csharp/package.json +++ b/packages/http-server-csharp/package.json @@ -1,6 +1,6 @@ { "name": "@typespec/http-server-csharp", - "version": "0.58.0-alpha.5", + "version": "0.58.0-alpha.6", "author": "Microsoft Corporation", "description": "TypeSpec service code generator for c-sharp", "homepage": "https://typespec.io", diff --git a/packages/http-server-javascript/CHANGELOG.md b/packages/http-server-javascript/CHANGELOG.md index c4a901ff0b..d37183674f 100644 --- a/packages/http-server-javascript/CHANGELOG.md +++ b/packages/http-server-javascript/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog - @typespec/http-server-javascript +## 0.58.0-alpha.6 + +### Bug Fixes + +- [#5253](https://github.com/microsoft/typespec/pull/5253) Added an additional check for the presence of a property before performing a bounds check on integer properties constrained to a range. +- [#5253](https://github.com/microsoft/typespec/pull/5253) Fixed a null check in query parameter requiredness check by replacing it with a falseness check. +- [#5188](https://github.com/microsoft/typespec/pull/5188) Added logic to handle "unspeakable" identifier names (#5185) + + ## 0.58.0-alpha.5 ### Bump dependencies diff --git a/packages/http-server-javascript/package.json b/packages/http-server-javascript/package.json index f01721be96..6cb073d561 100644 --- a/packages/http-server-javascript/package.json +++ b/packages/http-server-javascript/package.json @@ -1,6 +1,6 @@ { "name": "@typespec/http-server-javascript", - "version": "0.58.0-alpha.5", + "version": "0.58.0-alpha.6", "author": "Microsoft Corporation", "description": "TypeSpec HTTP server code generator for JavaScript", "homepage": "https://github.com/microsoft/typespec", diff --git a/packages/http-specs/CHANGELOG.md b/packages/http-specs/CHANGELOG.md index 58bad29b66..a314de139e 100644 --- a/packages/http-specs/CHANGELOG.md +++ b/packages/http-specs/CHANGELOG.md @@ -1,5 +1,19 @@ # @typespec/http-specs +## 0.1.0-alpha.5 + +### Bug Fixes + +- [#5049](https://github.com/microsoft/typespec/pull/5049) Fix dotnet compatibility failure in http-specs +- [#5184](https://github.com/microsoft/typespec/pull/5184) Fix api-key mockapi +- [#5217](https://github.com/microsoft/typespec/pull/5217) update code in versioning/removed and removed type/model/templated. + +### Features + +- [#5211](https://github.com/microsoft/typespec/pull/5211) add link case of server driven pagination test +- [#5210](https://github.com/microsoft/typespec/pull/5210) add none visibility test + + ## 0.1.0-alpha.4 - Update Versioning/Removed Project And Removed Type/Model/Templated. Please refer [PR #5217](https://github.com/microsoft/typespec/pull/5217) for further details. diff --git a/packages/http-specs/package.json b/packages/http-specs/package.json index 93ca09e3fa..b0a541b37c 100644 --- a/packages/http-specs/package.json +++ b/packages/http-specs/package.json @@ -1,6 +1,6 @@ { "name": "@typespec/http-specs", - "version": "0.1.0-alpha.4", + "version": "0.1.0-alpha.5", "description": "Spec scenarios and mock apis", "main": "dist/index.js", "type": "module", diff --git a/packages/http/CHANGELOG.md b/packages/http/CHANGELOG.md index 9b6fd20a04..878a8f6b6b 100644 --- a/packages/http/CHANGELOG.md +++ b/packages/http/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log - @typespec/http +## 0.63.0 + +### Bug Fixes + +- [#5016](https://github.com/microsoft/typespec/pull/5016) Uri template attributes were not extracted when parameter was explicitly mark with `@path` or `@query` as well + + ## 0.62.0 ### Bug Fixes diff --git a/packages/http/package.json b/packages/http/package.json index dec104b430..c3de64462c 100644 --- a/packages/http/package.json +++ b/packages/http/package.json @@ -1,6 +1,6 @@ { "name": "@typespec/http", - "version": "0.62.0", + "version": "0.63.0", "author": "Microsoft Corporation", "description": "TypeSpec HTTP protocol binding", "homepage": "https://github.com/microsoft/typespec", diff --git a/packages/internal-build-utils/CHANGELOG.md b/packages/internal-build-utils/CHANGELOG.md index 462085dad1..9013dbafa1 100644 --- a/packages/internal-build-utils/CHANGELOG.md +++ b/packages/internal-build-utils/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log - @typespec/internal-build-utils +## 0.63.0 + +No changes, version bump only. + ## 0.62.0 ### Bump dependencies diff --git a/packages/internal-build-utils/package.json b/packages/internal-build-utils/package.json index 94a5a42ee0..ceb679302e 100644 --- a/packages/internal-build-utils/package.json +++ b/packages/internal-build-utils/package.json @@ -1,6 +1,6 @@ { "name": "@typespec/internal-build-utils", - "version": "0.62.0", + "version": "0.63.0", "author": "Microsoft Corporation", "description": "Internal library to TypeSpec providing helpers to build.", "homepage": "https://typespec.io", diff --git a/packages/json-schema/CHANGELOG.md b/packages/json-schema/CHANGELOG.md index db7cae8cda..642001b75f 100644 --- a/packages/json-schema/CHANGELOG.md +++ b/packages/json-schema/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log - @typespec/json-schema +## 0.63.0 + +### Bug Fixes + +- [#5189](https://github.com/microsoft/typespec/pull/5189) Fixes crash that occurred when a template instantiation's template argument was a union that references a declaration. + + ## 0.62.0 ### Bug Fixes diff --git a/packages/json-schema/package.json b/packages/json-schema/package.json index 882278b308..62ce76104c 100644 --- a/packages/json-schema/package.json +++ b/packages/json-schema/package.json @@ -1,6 +1,6 @@ { "name": "@typespec/json-schema", - "version": "0.62.0", + "version": "0.63.0", "author": "Microsoft Corporation", "description": "TypeSpec library for emitting TypeSpec to JSON Schema and converting JSON Schema to TypeSpec", "homepage": "https://github.com/microsoft/typespec", diff --git a/packages/library-linter/CHANGELOG.md b/packages/library-linter/CHANGELOG.md index c302a1fafa..76f7c950b1 100644 --- a/packages/library-linter/CHANGELOG.md +++ b/packages/library-linter/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log - @typespec/library-linter +## 0.63.0 + +No changes, version bump only. + ## 0.62.0 ### Bump dependencies diff --git a/packages/library-linter/package.json b/packages/library-linter/package.json index 8f96278a44..ea7b757ed9 100644 --- a/packages/library-linter/package.json +++ b/packages/library-linter/package.json @@ -1,6 +1,6 @@ { "name": "@typespec/library-linter", - "version": "0.62.0", + "version": "0.63.0", "author": "Microsoft Corporation", "description": "TypeSpec library for linting another library.", "homepage": "https://typespec.io", diff --git a/packages/openapi/CHANGELOG.md b/packages/openapi/CHANGELOG.md index c26a8216d7..e5c25c6d98 100644 --- a/packages/openapi/CHANGELOG.md +++ b/packages/openapi/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log - @typespec/openapi +## 0.63.0 + +No changes, version bump only. + ## 0.62.0 ### Bump dependencies diff --git a/packages/openapi/package.json b/packages/openapi/package.json index 3ea8b9718c..b5787d4cb1 100644 --- a/packages/openapi/package.json +++ b/packages/openapi/package.json @@ -1,6 +1,6 @@ { "name": "@typespec/openapi", - "version": "0.62.0", + "version": "0.63.0", "author": "Microsoft Corporation", "description": "TypeSpec library providing OpenAPI concepts", "homepage": "https://typespec.io", diff --git a/packages/openapi3/CHANGELOG.md b/packages/openapi3/CHANGELOG.md index d9d3f78596..bbabcbd6f8 100644 --- a/packages/openapi3/CHANGELOG.md +++ b/packages/openapi3/CHANGELOG.md @@ -1,5 +1,17 @@ # Change Log - @typespec/openapi3 +## 0.63.0 + +### Bug Fixes + +- [#5006](https://github.com/microsoft/typespec/pull/5006) Illegal characters in component keys +- [#5274](https://github.com/microsoft/typespec/pull/5274) Added missing peer dependency "openapi-types" + +### Features + +- [#5029](https://github.com/microsoft/typespec/pull/5029) Add support for `#deprecated` for OpenAPI3Parameter + + ## 0.62.0 ### Bug Fixes diff --git a/packages/openapi3/package.json b/packages/openapi3/package.json index ddc25e531b..b66afceb1b 100644 --- a/packages/openapi3/package.json +++ b/packages/openapi3/package.json @@ -1,6 +1,6 @@ { "name": "@typespec/openapi3", - "version": "0.62.0", + "version": "0.63.0", "author": "Microsoft Corporation", "description": "TypeSpec library for emitting OpenAPI 3.0 from the TypeSpec REST protocol binding and converting OpenAPI3 to TypeSpec", "homepage": "https://typespec.io", diff --git a/packages/playground/CHANGELOG.md b/packages/playground/CHANGELOG.md index 1fac613ada..46ea32ecc5 100644 --- a/packages/playground/CHANGELOG.md +++ b/packages/playground/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log - @typespec/playground +## 0.6.1 + +No changes, version bump only. + ## 0.6.0 ### Bug Fixes diff --git a/packages/playground/package.json b/packages/playground/package.json index 647713c0d1..49b543fe33 100644 --- a/packages/playground/package.json +++ b/packages/playground/package.json @@ -1,6 +1,6 @@ { "name": "@typespec/playground", - "version": "0.6.0", + "version": "0.6.1", "author": "Microsoft Corporation", "description": "TypeSpec playground UI components.", "homepage": "https://typespec.io", diff --git a/packages/prettier-plugin-typespec/CHANGELOG.md b/packages/prettier-plugin-typespec/CHANGELOG.md index 4920d6242b..66263f7046 100644 --- a/packages/prettier-plugin-typespec/CHANGELOG.md +++ b/packages/prettier-plugin-typespec/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log - @typespec/prettier-plugin-typespec +## 0.63.0 + +No changes, version bump only. + ## 0.62.0 ### Bump dependencies diff --git a/packages/prettier-plugin-typespec/package.json b/packages/prettier-plugin-typespec/package.json index d37e0a7684..bd3c81370f 100644 --- a/packages/prettier-plugin-typespec/package.json +++ b/packages/prettier-plugin-typespec/package.json @@ -1,6 +1,6 @@ { "name": "@typespec/prettier-plugin-typespec", - "version": "0.62.0", + "version": "0.63.0", "description": "", "main": "dist/index.js", "scripts": { diff --git a/packages/protobuf/CHANGELOG.md b/packages/protobuf/CHANGELOG.md index 8f26512189..baecd3ce1a 100644 --- a/packages/protobuf/CHANGELOG.md +++ b/packages/protobuf/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log - @typespec/protobuf +## 0.63.0 + +No changes, version bump only. + ## 0.62.0 ### Bump dependencies diff --git a/packages/protobuf/package.json b/packages/protobuf/package.json index 6ebf2617f1..e4d6651cd7 100644 --- a/packages/protobuf/package.json +++ b/packages/protobuf/package.json @@ -1,6 +1,6 @@ { "name": "@typespec/protobuf", - "version": "0.62.0", + "version": "0.63.0", "author": "Microsoft Corporation", "description": "TypeSpec library and emitter for Protobuf (gRPC)", "homepage": "https://github.com/microsoft/typespec", diff --git a/packages/rest/CHANGELOG.md b/packages/rest/CHANGELOG.md index 5d6d5b7335..24e3055148 100644 --- a/packages/rest/CHANGELOG.md +++ b/packages/rest/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log - @typespec/rest +## 0.63.0 + +No changes, version bump only. + ## 0.62.0 ### Bump dependencies diff --git a/packages/rest/package.json b/packages/rest/package.json index 452d30938f..bdc479251a 100644 --- a/packages/rest/package.json +++ b/packages/rest/package.json @@ -1,6 +1,6 @@ { "name": "@typespec/rest", - "version": "0.62.0", + "version": "0.63.0", "author": "Microsoft Corporation", "description": "TypeSpec REST protocol binding", "homepage": "https://typespec.io", diff --git a/packages/spec-api/CHANGELOG.md b/packages/spec-api/CHANGELOG.md index 8db935f406..3b4b904787 100644 --- a/packages/spec-api/CHANGELOG.md +++ b/packages/spec-api/CHANGELOG.md @@ -4,3 +4,7 @@ No changes, version bump only. +## 0.1.0-alpha.0 + +No changes, version bump only. + diff --git a/packages/spec-coverage-sdk/CHANGELOG.md b/packages/spec-coverage-sdk/CHANGELOG.md index a4aa9dfce2..84f70c9c06 100644 --- a/packages/spec-coverage-sdk/CHANGELOG.md +++ b/packages/spec-coverage-sdk/CHANGELOG.md @@ -1,5 +1,13 @@ # Change Log - @typespec/spec-coverage-sdk +## 0.1.0-alpha.2 + +No changes, version bump only. + +## 0.1.0-alpha.2 + +- Added `packageName` to `scenariosMetadata`. + ## 0.1.0-alpha.1 No changes, version bump only. diff --git a/packages/spec-coverage-sdk/package.json b/packages/spec-coverage-sdk/package.json index 286eb09abb..759a183d2e 100644 --- a/packages/spec-coverage-sdk/package.json +++ b/packages/spec-coverage-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@typespec/spec-coverage-sdk", - "version": "0.1.0-alpha.1", + "version": "0.1.0-alpha.2", "description": "Spec utility to manage the reported coverage", "main": "dist/index.js", "type": "module", diff --git a/packages/spec-coverage-sdk/src/types.ts b/packages/spec-coverage-sdk/src/types.ts index 8347560e60..db80653900 100644 --- a/packages/spec-coverage-sdk/src/types.ts +++ b/packages/spec-coverage-sdk/src/types.ts @@ -58,6 +58,7 @@ export interface ResolvedCoverageReport extends CoverageReport { export interface ScenariosMetadata { version: string; commit: string; + packageName: string; } export interface GeneratorMetadata { diff --git a/packages/spec-dashboard/src/apis.ts b/packages/spec-dashboard/src/apis.ts index b731ff9ada..82ea1166ad 100644 --- a/packages/spec-dashboard/src/apis.ts +++ b/packages/spec-dashboard/src/apis.ts @@ -7,27 +7,31 @@ import { const storageAccountName = "typespec"; export type GeneratorNames = - | "python" - | "typescript/rlc" - | "typescript/modular" - | "csharp" + | "@typespec/http-client-python" + | "@azure-tools/typespec-python" + | "@azure-tools/typespec-go" + | "@azure-tools/typespec-csharp" | "@typespec/http-client-csharp" - | "java" - | "go" - | "cpp" - | "rust" + | "@azure-tools/typespec-ts-rlc" + | "@azure-tools/typespec-ts-modular" + | "@azure-tools/typespec-java" + | "@typespec/http-client-java" + | "@azure-tools/typespec-cpp" + | "@azure-tools/typespec-rust" | "test"; const query = new URLSearchParams(window.location.search); const generatorNames: GeneratorNames[] = [ - "python", - "typescript/rlc", - "typescript/modular", - "csharp", + "@typespec/http-client-python", + "@azure-tools/typespec-python", + "@azure-tools/typespec-go", + "@azure-tools/typespec-csharp", "@typespec/http-client-csharp", - "java", - "go", - "cpp", - "rust", + "@azure-tools/typespec-ts-rlc", + "@azure-tools/typespec-ts-modular", + "@azure-tools/typespec-java", + "@typespec/http-client-java", + "@azure-tools/typespec-cpp", + "@azure-tools/typespec-rust", ...(query.has("showtest") ? (["test"] as const) : []), ]; diff --git a/packages/spector/CHANGELOG.md b/packages/spector/CHANGELOG.md index 9c289f07cf..f851e7ba55 100644 --- a/packages/spector/CHANGELOG.md +++ b/packages/spector/CHANGELOG.md @@ -1,5 +1,13 @@ # Change Log - @typespec/spector +## 0.1.0-alpha.5 + +No changes, version bump only. + +## 0.1.0-alpha.4 + +- Update `server start` script parameter - `scenarioPath` to `scenarioPaths`. + ## 0.1.0-alpha.3 No changes, version bump only. diff --git a/packages/spector/package.json b/packages/spector/package.json index 7b25e966de..a91d478ca0 100644 --- a/packages/spector/package.json +++ b/packages/spector/package.json @@ -1,6 +1,6 @@ { "name": "@typespec/spector", - "version": "0.1.0-alpha.3", + "version": "0.1.0-alpha.5", "description": "Typespec Core Tool to validate, run mock api, collect coverage.", "exports": { ".": { diff --git a/packages/spector/src/actions/serve.ts b/packages/spector/src/actions/serve.ts index 4655f218b8..ef03d7c481 100644 --- a/packages/spector/src/actions/serve.ts +++ b/packages/spector/src/actions/serve.ts @@ -39,14 +39,14 @@ export async function startInBackground(config: ServeConfig) { const [nodeExe, entrypoint] = process.argv; logger.info(`Starting server in background at port ${config.port}`); const scenariosPath = Array.isArray(config.scenariosPath) - ? config.scenariosPath.join(" ") - : config.scenariosPath; + ? config.scenariosPath + : [config.scenariosPath]; const cp = spawn( nodeExe, [ entrypoint, "serve", - scenariosPath, + ...scenariosPath, "--port", config.port.toString(), "--coverageFile", diff --git a/packages/spector/src/cli/cli.ts b/packages/spector/src/cli/cli.ts index 65be2b6f1a..4df5ba4419 100644 --- a/packages/spector/src/cli/cli.ts +++ b/packages/spector/src/cli/cli.ts @@ -92,13 +92,14 @@ async function main() { .command("server", "Server management", (cmd) => { cmd .command( - "start ", + "start ", "Start the server in the background.", (cmd) => { return cmd - .positional("scenariosPath", { - description: "Path to the scenarios and mock apis", + .positional("scenariosPaths", { + description: "Path(s) to the scenarios and mock apis", type: "string", + array: true, demandOption: true, }) .option("port", { @@ -115,7 +116,7 @@ async function main() { }, async (args) => startInBackground({ - scenariosPath: resolve(process.cwd(), args.scenariosPath), + scenariosPath: args.scenariosPaths, port: args.port, coverageFile: args.coverageFile, }), diff --git a/packages/spector/src/coverage/common.ts b/packages/spector/src/coverage/common.ts index fff4d080c9..a9d1ff8f93 100644 --- a/packages/spector/src/coverage/common.ts +++ b/packages/spector/src/coverage/common.ts @@ -6,5 +6,6 @@ export async function getScenarioMetadata(scenariosPath: string): Promise { + if ( + diagnostic.source === "TypeSpec" && + diagnostic.code && + typeof diagnostic.code === "object" && + "target" in diagnostic.code && + "value" in diagnostic.code + ) { + actions.push( + this.createOpenUrlCodeAction( + diagnostic, + diagnostic.code.target.toString(), + diagnostic.code.value.toString(), + ), + ); + } + }); + return actions; + } + + private createOpenUrlCodeAction( + diagnostic: vscode.Diagnostic, + url: string, + codeActionTitle: string, + ): vscode.CodeAction { + // 'vscode.CodeActionKind.Empty' does not generate a Code Action menu, You must use 'vscode.CodeActionKind.QuickFix' + const action = new vscode.CodeAction( + `See documentation for "${codeActionTitle}"`, + vscode.CodeActionKind.QuickFix, + ); + action.command = { + command: OPEN_URL_COMMAND, + title: diagnostic.message, + arguments: [url], + }; + action.diagnostics = [diagnostic]; + return action; + } +} diff --git a/packages/typespec-vscode/src/extension.ts b/packages/typespec-vscode/src/extension.ts index 3647a203f6..7fe2a5f468 100644 --- a/packages/typespec-vscode/src/extension.ts +++ b/packages/typespec-vscode/src/extension.ts @@ -1,10 +1,12 @@ import vscode, { commands, ExtensionContext } from "vscode"; +import { createCodeActionProvider } from "./code-action-provider.js"; import { SettingName } from "./const.js"; import { ExtensionLogListener } from "./log/extension-log-listener.js"; import logger from "./log/logger.js"; import { TypeSpecLogOutputChannel } from "./log/typespec-log-output-channel.js"; import { createTaskProvider } from "./task-provider.js"; import { TspLanguageClient } from "./tsp-language-client.js"; +import { createCommandOpenUrl } from "./vscode-command.js"; let client: TspLanguageClient | undefined; /** @@ -17,6 +19,9 @@ logger.registerLogListener("extension-log", new ExtensionLogListener(outputChann export async function activate(context: ExtensionContext) { context.subscriptions.push(createTaskProvider()); + context.subscriptions.push(createCodeActionProvider()); + context.subscriptions.push(createCommandOpenUrl()); + context.subscriptions.push( commands.registerCommand("typespec.showOutputChannel", () => { outputChannel.show(true /*preserveFocus*/); diff --git a/packages/typespec-vscode/src/vscode-command.ts b/packages/typespec-vscode/src/vscode-command.ts new file mode 100644 index 0000000000..c9a16a0138 --- /dev/null +++ b/packages/typespec-vscode/src/vscode-command.ts @@ -0,0 +1,15 @@ +import vscode from "vscode"; +import logger from "./log/logger.js"; + +export const OPEN_URL_COMMAND = "typespec.openUrl"; + +export function createCommandOpenUrl() { + return vscode.commands.registerCommand(OPEN_URL_COMMAND, (url: string) => { + // Although vscode has already dealt with the problem of wrong URL, try catch is still added here. + try { + vscode.env.openExternal(vscode.Uri.parse(url)); + } catch (error) { + logger.error(`Failed to open URL: ${url}`, [error as any]); + } + }); +} diff --git a/packages/versioning/CHANGELOG.md b/packages/versioning/CHANGELOG.md index 9915db7881..c2132a8b6d 100644 --- a/packages/versioning/CHANGELOG.md +++ b/packages/versioning/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log - @typespec/versioning +## 0.63.0 + +### Bug Fixes + +- [#5262](https://github.com/microsoft/typespec/pull/5262) Fixes diagnostics for @typeChangedFrom to properly detect when an incompatible version is referenced inside of a template, union, or tuple. + + ## 0.62.0 ### Bump dependencies diff --git a/packages/versioning/package.json b/packages/versioning/package.json index b29f04c705..15866bef9c 100644 --- a/packages/versioning/package.json +++ b/packages/versioning/package.json @@ -1,6 +1,6 @@ { "name": "@typespec/versioning", - "version": "0.62.0", + "version": "0.63.0", "author": "Microsoft Corporation", "description": "TypeSpec library for declaring and emitting versioned APIs", "homepage": "https://typespec.io", diff --git a/packages/xml/CHANGELOG.md b/packages/xml/CHANGELOG.md index 9defe29596..283d4d053e 100644 --- a/packages/xml/CHANGELOG.md +++ b/packages/xml/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog - @typespec/xml +## 0.63.0 + +No changes, version bump only. + ## 0.62.0 ### Bump dependencies diff --git a/packages/xml/package.json b/packages/xml/package.json index 5ac6d18727..a62a5c1e2a 100644 --- a/packages/xml/package.json +++ b/packages/xml/package.json @@ -1,6 +1,6 @@ { "name": "@typespec/xml", - "version": "0.62.0", + "version": "0.63.0", "author": "Microsoft Corporation", "description": "TypeSpec library providing xml bindings", "homepage": "https://typespec.io", diff --git a/website/src/content/docs/docs/release-notes/release-2024-12-10.md b/website/src/content/docs/docs/release-notes/release-2024-12-10.md new file mode 100644 index 0000000000..629d81a747 --- /dev/null +++ b/website/src/content/docs/docs/release-notes/release-2024-12-10.md @@ -0,0 +1,69 @@ +--- +title: 0.63 - December 2024 +releaseDate: 2024-12-10 +version: "0.63" +--- + +## Notable changes + +### Experimental: Improve Realm, Mutator, and Typekit implementations + +The compiler strongly binds a Realm and Typekit together, and changes mutators so that new types are cloned within the mutator's realm. The default Typekit now creates a default typekit realm for the current program, and a Typekit can be easily created to work in a specific Program or Realm as needed. + +### Enum-driven Visibility + +A new mechanism for visibility that defines valid visibility values in enums and provides tools for filtering types by visibility. A new `LifecycleVisibility` enum defines standard protocol-agnostic visibility values for operations that manage the lifecycle (creation, update, deletion) of a resource. More details on visibility enums are available [in website documentation](../language-basics/visibility.md) + +## Features + +### @typespec/compiler + +- [#4937](https://github.com/microsoft/typespec/pull/4937) Add mutateSubgraphWithNamespace as a separate API +- [#4837](https://github.com/microsoft/typespec/pull/4837) Allow trailing delimiter in array values, tuple, decorator declaration, scalar initializer, etc. +- [#5149](https://github.com/microsoft/typespec/pull/5149) Experimental: Improve Realm, Mutator, and Typekit implementations. + +- [#4825](https://github.com/microsoft/typespec/pull/4825) Adds support for enum-driven visibility in the compiler core. + +### @typespec/openapi3 + +- [#5029](https://github.com/microsoft/typespec/pull/5029) Add support for `#deprecated` for OpenAPI3Parameter + +## Bug Fixes + +### @typespec/compiler + +- [#5252](https://github.com/microsoft/typespec/pull/5252) Added RegEx validation for @pattern and will throw warning for invalid RegEx string + +### @typespec/http + +- [#5016](https://github.com/microsoft/typespec/pull/5016) Uri template attributes were not extracted when parameter was explicitly mark with `@path` or `@query` as well + +### @typespec/http-server-csharp + +- [#4308](https://github.com/microsoft/typespec/issues/4308) Process sub-namespaces of a service +- [#4998](https://github.com/microsoft/typespec/issues/4998) Handle void returnType +- [#5000](https://github.com/microsoft/typespec/issues/5000) Handle tuple literals +- [#5001](https://github.com/microsoft/typespec/issues/5001) Skip envelope types withpout properties +- [#5024](https://github.com/microsoft/typespec/issues/5024) Literal type is not properly generated +- [#5124](https://github.com/microsoft/typespec/issues/5124) Skip uninstantiated templates +- [#5125](https://github.com/microsoft/typespec/issues/5125) Process operations outside interfaces +- Handle nullable types and anonymous typesin all contexts +- Add server-side numeric constraints for safeInt + +### @typespec/http-server-javascript + +- Add an additional check for the presence of a property before performing a bounds check on integer properties constrained to a range. +- [5185](https://github.com/microsoft/typespec/issues/5185) Add logic to handle invalid identifier names (#5185) + +### @typespec/versioning + +- [#5262](https://github.com/microsoft/typespec/pull/5262) Fixes diagnostics for @typeChangedFrom to properly detect when an incompatible version is referenced inside of a template, union, or tuple. + +### @typespec/openapi3 + +- [#5006](https://github.com/microsoft/typespec/pull/5006) Illegal characters in component keys +- [#5274](https://github.com/microsoft/typespec/pull/5274) Added missing peer dependency "openapi-types" + +### @typespec/json-schema + +- [#5189](https://github.com/microsoft/typespec/pull/5189) Fixes crash that occurred when a template instantiation's template argument was a union that references a declaration.