[tsp-client] Fix bundled dependency issue (#8817)
* Co-authored-by: catalinaperalta <catalinaperaltah@hotmail.com> Update package.json * Revert bundleDependency. * Restore bundleDependency * Revert change. * Restore bundleDependency * Replace local install with repo install. * Code review feedback.
This commit is contained in:
Родитель
37ef13ea37
Коммит
f2506c23d5
|
@ -3,3 +3,5 @@ node_modules
|
|||
dist
|
||||
types
|
||||
temp
|
||||
tsp-output/
|
||||
output/
|
|
@ -3,6 +3,7 @@
|
|||
## 2024-08-12 - 0.11.2
|
||||
|
||||
- Fix `--version` flag. (#8814)
|
||||
- Added `compare` command to compare a hand-authored Swagger to a TypeSpec-generated Swagger to understand the relevant differences between them.
|
||||
|
||||
## 2024-08-08 - 0.11.1
|
||||
|
||||
|
@ -13,6 +14,7 @@
|
|||
- Added `generate-lock-file` command, see [README](https://github.com/Azure/azure-sdk-tools/blob/main/tools/tsp-client/README.md) for more information.
|
||||
- Removed the `--generate-lock-file` flag and replaced it with the command above.
|
||||
- Migrated tsp-client from `node:util` to `yargs` for commandline infrastructure.
|
||||
- Added `compare` command to compare a hand-authored Swagger to a TypeSpec-generated Swagger to understand the relevant differences between them.
|
||||
|
||||
## 2024-08-05 - 0.10.0
|
||||
|
||||
|
|
|
@ -3,28 +3,33 @@
|
|||
A simple command line tool to facilitate generating client libraries from TypeSpec.
|
||||
|
||||
## Installation
|
||||
|
||||
```
|
||||
npm install @azure-tools/typespec-client-generator-cli
|
||||
```
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Please note that these prerequisites apply on the repository where the client library is going to be generated. Repo owners should make sure to follow these prerequisites. Users working with a repository that already accepts this tool can continue to see the [Usage](#usage) section.
|
||||
|
||||
- Add an emitter-package.json to the repo following this [configuration](#emitter-packagejson).
|
||||
- Add the [TempTypeSpecFiles](#TempTypeSpecFiles) directory to the .gitignore file for your repository.
|
||||
|
||||
## Usage
|
||||
|
||||
```
|
||||
tsp-client <command> [options]
|
||||
```
|
||||
|
||||
## Commands
|
||||
|
||||
Use one of the supported commands to get started generating clients from a TypeSpec project.
|
||||
This tool will default to using your current working directory to generate clients in and will
|
||||
use it to look for relevant configuration files. To specify a different output directory, use
|
||||
the `-o` or `--output-dir` option.
|
||||
|
||||
### init
|
||||
|
||||
Initialize the client library directory using a tspconfig.yaml. When running this command pass in a path to a local or remote tspconfig.yaml with the `-c` or `--tsp-config` flag.
|
||||
|
||||
The `init` command generates a directory structure following the standard pattern used across Azure SDK language repositories, creates a [tsp-location.yaml](#tsp-locationyaml) file to control generation, and performs an initial generation of the client library. If you want to skip client library generation, then pass the `--skip-sync-and-generate` flag.
|
||||
|
@ -32,20 +37,30 @@ The `init` command generates a directory structure following the standard patter
|
|||
> IMPORTANT: This command should be run from the root of the repository.
|
||||
|
||||
### update
|
||||
|
||||
Sync and generate client libraries from a TypeSpec project. The `update` command will look for a [tsp-location.yaml](#tsp-locationyaml) file in your current directory to sync a TypeSpec project and generate a client library.
|
||||
|
||||
### sync
|
||||
|
||||
Sync a TypeSpec project with the parameters specified in tsp-location.yaml.
|
||||
|
||||
By default the `sync` command will look for a tsp-location.yaml to get the project details and sync them to a temporary directory called `TempTypeSpecFiles`. Alternately, you can pass in the `--local-spec-repo` flag with the path to your local TypeSpec project to pull those files into your temporary directory.
|
||||
|
||||
### generate
|
||||
|
||||
Generate a client library from a TypeSpec project. The `generate` command should be run after the `sync` command. `generate` relies on the existence of the `TempTypeSpecFiles` directory created by the `sync` command and on an `emitter-package.json` file checked into your repository at the following path: `<repo root>/eng/emitter-package.json`. The `emitter-package.json` file is used to install project dependencies and get the appropriate emitter package.
|
||||
|
||||
### convert
|
||||
|
||||
Convert an existing swagger specification to a TypeSpec project. This command should only be run once to get started working on a TypeSpec project. TypeSpec projects will need to be optimized manually and fully reviewed after conversion. When using this command a path or url to a swagger README file is required through the `--swagger-readme` flag.
|
||||
|
||||
### compare
|
||||
|
||||
Compares two Swagger definitions to identify the relevant differences between them. This command is useful when comparing an existing Swagger definition with a TypeSpec generated one. The `compare` command requires two parameters: `--lhs` which will typically be the original hand-authored Swagger and `--rhs` which will usually be the folder containing your TypeSpec. The command will generate the Swagger and compare the two definitions. The command will ignore differences in the Swagger that don't
|
||||
correspond to differences in the service, allowing you to focus only on differences that are relevant.
|
||||
|
||||
### sort-swagger
|
||||
|
||||
Sort an existing swagger specification to be the same content order with TypeSpec generated swagger. This will allow you to easily compare and identify differences between the existing swagger and TypeSpec generated one. You should run this command on existing swagger files and check them in prior to creating converted TypeSpec PRs.
|
||||
|
||||
### generate-lock-file
|
||||
|
@ -53,6 +68,7 @@ Sort an existing swagger specification to be the same content order with TypeSpe
|
|||
Generate an emitter-package-lock.json under the eng/ directory based on existing `<repo-root>/eng/emitter-package.json`.
|
||||
|
||||
## Options
|
||||
|
||||
```
|
||||
--arm Convert ARM swagger specification to TypeSpec [boolean]
|
||||
-c, --tsp-config The tspconfig.yaml file to use [string]
|
||||
|
@ -65,9 +81,9 @@ Generate an emitter-package-lock.json under the eng/ directory based on existing
|
|||
--save-inputs Don't clean up the temp directory after generation [boolean]
|
||||
--skip-sync-and-generate Skip sync and generate during project init [boolean]
|
||||
--swagger-readme Path or url to swagger readme file [string]
|
||||
-o, --output-dir Specify an alternate output directory for the
|
||||
-o, --output-dir Specify an alternate output directory for the
|
||||
generated files. Default is your current directory [string]
|
||||
--repo Repository where the project is defined for init
|
||||
--repo Repository where the project is defined for init
|
||||
or update [string]
|
||||
-v, --version Show version number [boolean]
|
||||
```
|
||||
|
@ -91,22 +107,23 @@ tsp-client update
|
|||
## Important concepts
|
||||
|
||||
### Per project setup
|
||||
|
||||
Each project will need to have a configuration file called tsp-location.yaml that will tell the tool where to find the TypeSpec project.
|
||||
|
||||
#### tsp-location.yaml
|
||||
|
||||
This file is created through the `tsp-client init` command or you can manually create it under the project directory to run other commands supported by this tool.
|
||||
This file is created through the `tsp-client init` command or you can manually create it under the project directory to run other commands supported by this tool.
|
||||
|
||||
> NOTE: This file should live under the project directory for each service.
|
||||
|
||||
The file has the following properties:
|
||||
|
||||
| Property | Description | IsRequired |
|
||||
| --- | --- | --- |
|
||||
| <a id="directory-anchor"></a> directory | The top level directory where the main.tsp for the service lives. This should be relative to the spec repo root such as `specification/cognitiveservices/OpenAI.Inference` | true |
|
||||
| <a id="additionalDirectories-anchor"></a> additionalDirectories | Sometimes a typespec file will use a relative import that might not be under the main directory. In this case a single `directory` will not be enough to pull down all necessary files. To support this you can specify additional directories as a list to sync so that all needed files are synced. | false: default = null |
|
||||
| <a id="commit-anchor"></a> commit | The commit sha for the version of the typespec files you want to generate off of. This allows us to have idempotence on generation until we opt into pointing at a later version. | true |
|
||||
| <a id="repo-anchor"></a> repo | The repo this spec lives in. This should be either `Azure/azure-rest-api-specs` or `Azure/azure-rest-api-specs-pr`. Note that pr will work locally but not in CI until we add another change to handle token based auth. | true |
|
||||
| Property | Description | IsRequired |
|
||||
| --------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------- |
|
||||
| <a id="directory-anchor"></a> directory | The top level directory where the main.tsp for the service lives. This should be relative to the spec repo root such as `specification/cognitiveservices/OpenAI.Inference` | true |
|
||||
| <a id="additionalDirectories-anchor"></a> additionalDirectories | Sometimes a typespec file will use a relative import that might not be under the main directory. In this case a single `directory` will not be enough to pull down all necessary files. To support this you can specify additional directories as a list to sync so that all needed files are synced. | false: default = null |
|
||||
| <a id="commit-anchor"></a> commit | The commit sha for the version of the typespec files you want to generate off of. This allows us to have idempotence on generation until we opt into pointing at a later version. | true |
|
||||
| <a id="repo-anchor"></a> repo | The repo this spec lives in. This should be either `Azure/azure-rest-api-specs` or `Azure/azure-rest-api-specs-pr`. Note that pr will work locally but not in CI until we add another change to handle token based auth. | true |
|
||||
|
||||
Example:
|
||||
|
||||
|
@ -135,7 +152,6 @@ See the following example of a valid tspconfig.yaml file: https://github.com/Azu
|
|||
|
||||
Using the tspconfig.yaml linked above, by default, the client libraries will be generated in the following directory for C#: `<repo>/sdk/contosowidgetmanager/Azure.Template.Contoso/`.
|
||||
|
||||
|
||||
### emitter-package.json (Required)
|
||||
|
||||
`emitter-package.json` will be used the same as a `package.json` file. If the is no `emitter-package-lock.json` file, the tool will run `npm install` on the contents of `emitter-package.json`. This file allows each repository to pin the version of their emitter and other dependencies to be used when generating client libraries.
|
||||
|
@ -145,16 +161,16 @@ Example:
|
|||
|
||||
```json
|
||||
{
|
||||
"main": "dist/src/index.js",
|
||||
"dependencies": {
|
||||
"@azure-tools/typespec-csharp": "0.1.11-beta.20230123.1"
|
||||
}
|
||||
"main": "dist/src/index.js",
|
||||
"dependencies": {
|
||||
"@azure-tools/typespec-csharp": "0.1.11-beta.20230123.1"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
> NOTE: tsp compile currently requires the "main" line to be there.
|
||||
|
||||
> NOTE: This file replaces the package.json checked into the `azure-rest-api-spec` repository.
|
||||
> NOTE: This file replaces the package.json checked into the `azure-rest-api-spec` repository.
|
||||
|
||||
### emitter-package-lock.json (Optional)
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "@azure-tools/typespec-client-generator-cli",
|
||||
"version": "0.11.1",
|
||||
"version": "0.11.2",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@azure-tools/typespec-client-generator-cli",
|
||||
"version": "0.11.1",
|
||||
"version": "0.11.2",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@autorest/csharp": "https://aka.ms/azsdk/openapi-to-typespec-csharp",
|
||||
|
@ -17,6 +17,7 @@
|
|||
"autorest": "^3.7.1",
|
||||
"chalk": "^5.3.0",
|
||||
"dotenv": "^16.4.5",
|
||||
"openapi-diff": "github:tjprescott/openapi-diff#8edec5e2d2ad0ba57e8cdebda20e7b0c6e225699",
|
||||
"prompt-sync": "^4.2.0",
|
||||
"simple-git": "^3.20.0",
|
||||
"yaml": "^2.3.1",
|
||||
|
@ -304,6 +305,17 @@
|
|||
"url": "https://github.com/prettier/prettier?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/@autorest/openapi-to-typespec/node_modules/yaml": {
|
||||
"version": "2.4.5",
|
||||
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.5.tgz",
|
||||
"integrity": "sha512-aBx2bnqDzVOyNKfsysjA2ms5ZlnjSAW2eG3/L5G/CSujfjLJTJsEw1bGw8kCf04KodQWk1pxlGnZ56CRxiawmg==",
|
||||
"bin": {
|
||||
"yaml": "bin.mjs"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 14"
|
||||
}
|
||||
},
|
||||
"node_modules/@azure-tools/async-io": {
|
||||
"version": "3.0.254",
|
||||
"resolved": "https://registry.npmjs.org/@azure-tools/async-io/-/async-io-3.0.254.tgz",
|
||||
|
@ -597,362 +609,10 @@
|
|||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/aix-ppc64": {
|
||||
"version": "0.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz",
|
||||
"integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==",
|
||||
"cpu": [
|
||||
"ppc64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"aix"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/android-arm": {
|
||||
"version": "0.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz",
|
||||
"integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"android"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/android-arm64": {
|
||||
"version": "0.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz",
|
||||
"integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"android"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/android-x64": {
|
||||
"version": "0.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz",
|
||||
"integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"android"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/darwin-arm64": {
|
||||
"version": "0.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz",
|
||||
"integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"darwin"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/darwin-x64": {
|
||||
"version": "0.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz",
|
||||
"integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"darwin"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/freebsd-arm64": {
|
||||
"version": "0.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz",
|
||||
"integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"freebsd"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/freebsd-x64": {
|
||||
"version": "0.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz",
|
||||
"integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"freebsd"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/linux-arm": {
|
||||
"version": "0.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz",
|
||||
"integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/linux-arm64": {
|
||||
"version": "0.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz",
|
||||
"integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/linux-ia32": {
|
||||
"version": "0.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz",
|
||||
"integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==",
|
||||
"cpu": [
|
||||
"ia32"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/linux-loong64": {
|
||||
"version": "0.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz",
|
||||
"integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==",
|
||||
"cpu": [
|
||||
"loong64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/linux-mips64el": {
|
||||
"version": "0.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz",
|
||||
"integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==",
|
||||
"cpu": [
|
||||
"mips64el"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/linux-ppc64": {
|
||||
"version": "0.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz",
|
||||
"integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==",
|
||||
"cpu": [
|
||||
"ppc64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/linux-riscv64": {
|
||||
"version": "0.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz",
|
||||
"integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==",
|
||||
"cpu": [
|
||||
"riscv64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/linux-s390x": {
|
||||
"version": "0.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz",
|
||||
"integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==",
|
||||
"cpu": [
|
||||
"s390x"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/linux-x64": {
|
||||
"version": "0.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz",
|
||||
"integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/netbsd-x64": {
|
||||
"version": "0.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz",
|
||||
"integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"netbsd"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/openbsd-x64": {
|
||||
"version": "0.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz",
|
||||
"integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"openbsd"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/sunos-x64": {
|
||||
"version": "0.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz",
|
||||
"integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"sunos"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/win32-arm64": {
|
||||
"version": "0.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz",
|
||||
"integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/win32-ia32": {
|
||||
"version": "0.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz",
|
||||
"integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==",
|
||||
"cpu": [
|
||||
"ia32"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/win32-x64": {
|
||||
"version": "0.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz",
|
||||
"integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==",
|
||||
"version": "0.23.0",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.23.0.tgz",
|
||||
"integrity": "sha512-Arm+WgUFLUATuoxCJcahGuk6Yj9Pzxd6l11Zb/2aAuv5kWWvvfhLFo2fni4uSK5vzlUdCGZ/BdV5tH8klj8p8g==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
|
@ -962,7 +622,7 @@
|
|||
"win32"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
"node": ">=18"
|
||||
}
|
||||
},
|
||||
"node_modules/@isaacs/cliui": {
|
||||
|
@ -1204,9 +864,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"node_modules/@types/yargs": {
|
||||
"version": "17.0.32",
|
||||
"resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz",
|
||||
"integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==",
|
||||
"version": "17.0.33",
|
||||
"resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.33.tgz",
|
||||
"integrity": "sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==",
|
||||
"dependencies": {
|
||||
"@types/yargs-parser": "*"
|
||||
}
|
||||
|
@ -1244,18 +904,15 @@
|
|||
"node": ">=18.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@typespec/compiler/node_modules/prettier": {
|
||||
"version": "3.3.3",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz",
|
||||
"integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==",
|
||||
"node_modules/@typespec/compiler/node_modules/yaml": {
|
||||
"version": "2.4.5",
|
||||
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.5.tgz",
|
||||
"integrity": "sha512-aBx2bnqDzVOyNKfsysjA2ms5ZlnjSAW2eG3/L5G/CSujfjLJTJsEw1bGw8kCf04KodQWk1pxlGnZ56CRxiawmg==",
|
||||
"bin": {
|
||||
"prettier": "bin/prettier.cjs"
|
||||
"yaml": "bin.mjs"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/prettier/prettier?sponsor=1"
|
||||
"node": ">= 14"
|
||||
}
|
||||
},
|
||||
"node_modules/@typespec/http": {
|
||||
|
@ -1334,7 +991,6 @@
|
|||
"version": "8.12.1",
|
||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz",
|
||||
"integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"acorn": "bin/acorn"
|
||||
},
|
||||
|
@ -1346,7 +1002,6 @@
|
|||
"version": "8.3.3",
|
||||
"resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.3.tgz",
|
||||
"integrity": "sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"acorn": "^8.11.0"
|
||||
},
|
||||
|
@ -1427,8 +1082,7 @@
|
|||
"node_modules/arg": {
|
||||
"version": "4.1.3",
|
||||
"resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz",
|
||||
"integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==",
|
||||
"dev": true
|
||||
"integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA=="
|
||||
},
|
||||
"node_modules/argparse": {
|
||||
"version": "2.0.1",
|
||||
|
@ -1644,8 +1298,7 @@
|
|||
"node_modules/create-require": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz",
|
||||
"integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==",
|
||||
"dev": true
|
||||
"integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ=="
|
||||
},
|
||||
"node_modules/cross-spawn": {
|
||||
"version": "7.0.3",
|
||||
|
@ -1689,6 +1342,11 @@
|
|||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/deep-diff": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/deep-diff/-/deep-diff-1.0.2.tgz",
|
||||
"integrity": "sha512-aWS3UIVH+NPGCD1kki+DCU9Dua032iSsO43LqQpcs4R3+dVv7tX0qBGjiVHJHjplsoUM2XRO/KB92glqc68awg=="
|
||||
},
|
||||
"node_modules/deep-eql": {
|
||||
"version": "4.1.4",
|
||||
"resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.4.tgz",
|
||||
|
@ -1733,41 +1391,42 @@
|
|||
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="
|
||||
},
|
||||
"node_modules/esbuild": {
|
||||
"version": "0.21.5",
|
||||
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz",
|
||||
"integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==",
|
||||
"version": "0.23.0",
|
||||
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.23.0.tgz",
|
||||
"integrity": "sha512-1lvV17H2bMYda/WaFb2jLPeHU3zml2k4/yagNMG8Q/YtfMjCwEUZa2eXXMgZTVSL5q1n4H7sQ0X6CdJDqqeCFA==",
|
||||
"dev": true,
|
||||
"hasInstallScript": true,
|
||||
"bin": {
|
||||
"esbuild": "bin/esbuild"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
"node": ">=18"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@esbuild/aix-ppc64": "0.21.5",
|
||||
"@esbuild/android-arm": "0.21.5",
|
||||
"@esbuild/android-arm64": "0.21.5",
|
||||
"@esbuild/android-x64": "0.21.5",
|
||||
"@esbuild/darwin-arm64": "0.21.5",
|
||||
"@esbuild/darwin-x64": "0.21.5",
|
||||
"@esbuild/freebsd-arm64": "0.21.5",
|
||||
"@esbuild/freebsd-x64": "0.21.5",
|
||||
"@esbuild/linux-arm": "0.21.5",
|
||||
"@esbuild/linux-arm64": "0.21.5",
|
||||
"@esbuild/linux-ia32": "0.21.5",
|
||||
"@esbuild/linux-loong64": "0.21.5",
|
||||
"@esbuild/linux-mips64el": "0.21.5",
|
||||
"@esbuild/linux-ppc64": "0.21.5",
|
||||
"@esbuild/linux-riscv64": "0.21.5",
|
||||
"@esbuild/linux-s390x": "0.21.5",
|
||||
"@esbuild/linux-x64": "0.21.5",
|
||||
"@esbuild/netbsd-x64": "0.21.5",
|
||||
"@esbuild/openbsd-x64": "0.21.5",
|
||||
"@esbuild/sunos-x64": "0.21.5",
|
||||
"@esbuild/win32-arm64": "0.21.5",
|
||||
"@esbuild/win32-ia32": "0.21.5",
|
||||
"@esbuild/win32-x64": "0.21.5"
|
||||
"@esbuild/aix-ppc64": "0.23.0",
|
||||
"@esbuild/android-arm": "0.23.0",
|
||||
"@esbuild/android-arm64": "0.23.0",
|
||||
"@esbuild/android-x64": "0.23.0",
|
||||
"@esbuild/darwin-arm64": "0.23.0",
|
||||
"@esbuild/darwin-x64": "0.23.0",
|
||||
"@esbuild/freebsd-arm64": "0.23.0",
|
||||
"@esbuild/freebsd-x64": "0.23.0",
|
||||
"@esbuild/linux-arm": "0.23.0",
|
||||
"@esbuild/linux-arm64": "0.23.0",
|
||||
"@esbuild/linux-ia32": "0.23.0",
|
||||
"@esbuild/linux-loong64": "0.23.0",
|
||||
"@esbuild/linux-mips64el": "0.23.0",
|
||||
"@esbuild/linux-ppc64": "0.23.0",
|
||||
"@esbuild/linux-riscv64": "0.23.0",
|
||||
"@esbuild/linux-s390x": "0.23.0",
|
||||
"@esbuild/linux-x64": "0.23.0",
|
||||
"@esbuild/netbsd-x64": "0.23.0",
|
||||
"@esbuild/openbsd-arm64": "0.23.0",
|
||||
"@esbuild/openbsd-x64": "0.23.0",
|
||||
"@esbuild/sunos-x64": "0.23.0",
|
||||
"@esbuild/win32-arm64": "0.23.0",
|
||||
"@esbuild/win32-ia32": "0.23.0",
|
||||
"@esbuild/win32-x64": "0.23.0"
|
||||
}
|
||||
},
|
||||
"node_modules/escalade": {
|
||||
|
@ -1855,9 +1514,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/foreground-child": {
|
||||
"version": "3.2.1",
|
||||
"resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.1.tgz",
|
||||
"integrity": "sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==",
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz",
|
||||
"integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"cross-spawn": "^7.0.0",
|
||||
|
@ -1876,20 +1535,6 @@
|
|||
"integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/fsevents": {
|
||||
"version": "2.3.3",
|
||||
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
|
||||
"integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
|
||||
"dev": true,
|
||||
"hasInstallScript": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"darwin"
|
||||
],
|
||||
"engines": {
|
||||
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/get-caller-file": {
|
||||
"version": "2.0.5",
|
||||
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
|
||||
|
@ -2241,8 +1886,7 @@
|
|||
"node_modules/make-error": {
|
||||
"version": "1.3.6",
|
||||
"resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
|
||||
"integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==",
|
||||
"dev": true
|
||||
"integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw=="
|
||||
},
|
||||
"node_modules/merge2": {
|
||||
"version": "1.4.1",
|
||||
|
@ -2286,9 +1930,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/mocha": {
|
||||
"version": "10.7.0",
|
||||
"resolved": "https://registry.npmjs.org/mocha/-/mocha-10.7.0.tgz",
|
||||
"integrity": "sha512-v8/rBWr2VO5YkspYINnvu81inSz2y3ODJrhO175/Exzor1RcEZZkizgE2A+w/CAXXoESS8Kys5E62dOHGHzULA==",
|
||||
"version": "10.7.3",
|
||||
"resolved": "https://registry.npmjs.org/mocha/-/mocha-10.7.3.tgz",
|
||||
"integrity": "sha512-uQWxAu44wwiACGqjbPYmjo7Lg8sFrS3dQe7PP2FQI+woptP4vZXSMcfMyFL/e1yFEeEpV4RtyTpZROOKmxis+A==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"ansi-colors": "^4.1.3",
|
||||
|
@ -2407,6 +2051,231 @@
|
|||
"wrappy": "1"
|
||||
}
|
||||
},
|
||||
"node_modules/openapi-diff": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "git+ssh://git@github.com/tjprescott/openapi-diff.git#8edec5e2d2ad0ba57e8cdebda20e7b0c6e225699",
|
||||
"integrity": "sha512-MshT1nFT7D2SceVm8kP9FX9+p1CZ/kvRYU8FruIknO1QduDeyx9NZsIqScYtaKU4QEbmRRMkh15zHwdlc2Iq8Q==",
|
||||
"dependencies": {
|
||||
"@azure-tools/typespec-autorest": "0.43.0",
|
||||
"@azure-tools/typespec-azure-core": "0.43.0",
|
||||
"acorn": "^8.12.0",
|
||||
"acorn-walk": "^8.3.3",
|
||||
"arg": "^4.1.3",
|
||||
"create-require": "^1.1.1",
|
||||
"deep-diff": "^1.0.2",
|
||||
"diff": "^4.0.2",
|
||||
"dotenv": "^16.4.5",
|
||||
"make-error": "^1.3.6",
|
||||
"undici-types": "^5.26.5",
|
||||
"v8-compile-cache-lib": "^3.0.1",
|
||||
"yargs": "^17.7.2",
|
||||
"yn": "^3.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/openapi-diff/node_modules/@azure-tools/typespec-autorest": {
|
||||
"version": "0.43.0",
|
||||
"resolved": "https://registry.npmjs.org/@azure-tools/typespec-autorest/-/typespec-autorest-0.43.0.tgz",
|
||||
"integrity": "sha512-tZ9uXXOdxu2y01W9n3mzXf+IEY2MQkP/JaQaKlcOx2+dbklHNQWSDU0Vm6Gmm6l//XiF9QiI8653BiuO97czyw==",
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@azure-tools/typespec-azure-core": "~0.43.0",
|
||||
"@azure-tools/typespec-azure-resource-manager": "~0.43.0",
|
||||
"@azure-tools/typespec-client-generator-core": "~0.43.0",
|
||||
"@typespec/compiler": "~0.57.0",
|
||||
"@typespec/http": "~0.57.0",
|
||||
"@typespec/openapi": "~0.57.0",
|
||||
"@typespec/rest": "~0.57.0",
|
||||
"@typespec/versioning": "~0.57.0"
|
||||
}
|
||||
},
|
||||
"node_modules/openapi-diff/node_modules/@azure-tools/typespec-azure-core": {
|
||||
"version": "0.43.0",
|
||||
"resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-core/-/typespec-azure-core-0.43.0.tgz",
|
||||
"integrity": "sha512-B1r0i3segJ7RuNXxcAMBy8H2t+jTkaf74dkyUWD0HIFPkhETN0uR59nuor+s+LoLU8yI4JypOFSNZt6e1rod8w==",
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@typespec/compiler": "~0.57.0",
|
||||
"@typespec/http": "~0.57.0",
|
||||
"@typespec/rest": "~0.57.0"
|
||||
}
|
||||
},
|
||||
"node_modules/openapi-diff/node_modules/@azure-tools/typespec-azure-resource-manager": {
|
||||
"version": "0.43.0",
|
||||
"resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-resource-manager/-/typespec-azure-resource-manager-0.43.0.tgz",
|
||||
"integrity": "sha512-0GQL+/o1u+PAB63FpYz3sy3ZgZvCtk5T4sDAnICnV23v2YWIONDMUfxxd0x40xJbY6PkcwwHDpBLNMqajf2H6A==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"change-case": "~5.4.4",
|
||||
"pluralize": "^8.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@azure-tools/typespec-azure-core": "~0.43.0",
|
||||
"@typespec/compiler": "~0.57.0",
|
||||
"@typespec/http": "~0.57.0",
|
||||
"@typespec/openapi": "~0.57.0",
|
||||
"@typespec/rest": "~0.57.0",
|
||||
"@typespec/versioning": "~0.57.0"
|
||||
}
|
||||
},
|
||||
"node_modules/openapi-diff/node_modules/@azure-tools/typespec-client-generator-core": {
|
||||
"version": "0.43.2",
|
||||
"resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.43.2.tgz",
|
||||
"integrity": "sha512-UAVV30BtTQBiXmBoQ3SyvmiuBDYoqWFIn7G96hjojpwXpE6D5ba0y5LascMuF1b65eAhGnnf974DElJE9DGepQ==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"change-case": "~5.4.4",
|
||||
"pluralize": "^8.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@azure-tools/typespec-azure-core": "~0.43.0",
|
||||
"@typespec/compiler": "~0.57.0",
|
||||
"@typespec/http": "~0.57.0",
|
||||
"@typespec/rest": "~0.57.0",
|
||||
"@typespec/versioning": "~0.57.0"
|
||||
}
|
||||
},
|
||||
"node_modules/openapi-diff/node_modules/@typespec/compiler": {
|
||||
"version": "0.57.0",
|
||||
"resolved": "https://registry.npmjs.org/@typespec/compiler/-/compiler-0.57.0.tgz",
|
||||
"integrity": "sha512-Z5L7J90Ol21IbzU+rBD2wzKy2vJ2Yg2FIzi+yB5rtb7/c4oBea/CgEByMVHBtT7uw45ZXJpHOiepuGSPVXw2EA==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@babel/code-frame": "~7.24.2",
|
||||
"ajv": "~8.13.0",
|
||||
"change-case": "~5.4.4",
|
||||
"globby": "~14.0.1",
|
||||
"mustache": "~4.2.0",
|
||||
"picocolors": "~1.0.1",
|
||||
"prettier": "~3.2.5",
|
||||
"prompts": "~2.4.2",
|
||||
"semver": "^7.6.2",
|
||||
"vscode-languageserver": "~9.0.1",
|
||||
"vscode-languageserver-textdocument": "~1.0.11",
|
||||
"yaml": "~2.4.2",
|
||||
"yargs": "~17.7.2"
|
||||
},
|
||||
"bin": {
|
||||
"tsp": "cmd/tsp.js",
|
||||
"tsp-server": "cmd/tsp-server.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/openapi-diff/node_modules/@typespec/http": {
|
||||
"version": "0.57.0",
|
||||
"resolved": "https://registry.npmjs.org/@typespec/http/-/http-0.57.0.tgz",
|
||||
"integrity": "sha512-k3bWOTPNqlRB3/TmrXVBtObmxj2J20l2FnhGXvs+tjdtbXLxCQWmvQz6xlne9nkLAtWVB/pQRUn+oMJfhWta3w==",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@typespec/compiler": "~0.57.0"
|
||||
}
|
||||
},
|
||||
"node_modules/openapi-diff/node_modules/@typespec/openapi": {
|
||||
"version": "0.57.0",
|
||||
"resolved": "https://registry.npmjs.org/@typespec/openapi/-/openapi-0.57.0.tgz",
|
||||
"integrity": "sha512-35wK/BqjOXSlhWuGMwoYN3FSgIYFOKtw8ot4ErcgmxAGuKaS2GkUhZvtQJXUn2ByU0Fl4jqslPmTz8SEcz7rbw==",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@typespec/compiler": "~0.57.0",
|
||||
"@typespec/http": "~0.57.0"
|
||||
}
|
||||
},
|
||||
"node_modules/openapi-diff/node_modules/@typespec/rest": {
|
||||
"version": "0.57.0",
|
||||
"resolved": "https://registry.npmjs.org/@typespec/rest/-/rest-0.57.0.tgz",
|
||||
"integrity": "sha512-mZj76Kf+cmH38pYA6LT8Zz7QjuR3fdQo5bc8pXhKMwLq9vRqNLz6Z9InbOeo8zY+xP0GfUwEU9kXczmCc8gyRA==",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@typespec/compiler": "~0.57.0",
|
||||
"@typespec/http": "~0.57.0"
|
||||
}
|
||||
},
|
||||
"node_modules/openapi-diff/node_modules/@typespec/versioning": {
|
||||
"version": "0.57.0",
|
||||
"resolved": "https://registry.npmjs.org/@typespec/versioning/-/versioning-0.57.0.tgz",
|
||||
"integrity": "sha512-kk6zCNSwcqqYB9isNNagTy+Zv6wEIRA4NkcZ/X1riTj2zhJwKsIFNXQWm1yxpZn+BY4+1QtuaQHuBLo8HbgR/w==",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@typespec/compiler": "~0.57.0"
|
||||
}
|
||||
},
|
||||
"node_modules/openapi-diff/node_modules/ajv": {
|
||||
"version": "8.13.0",
|
||||
"resolved": "https://registry.npmjs.org/ajv/-/ajv-8.13.0.tgz",
|
||||
"integrity": "sha512-PRA911Blj99jR5RMeTunVbNXMF6Lp4vZXnk5GQjcnUWUTsrXtekg/pnmFFI2u/I36Y/2bITGS30GZCXei6uNkA==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"fast-deep-equal": "^3.1.3",
|
||||
"json-schema-traverse": "^1.0.0",
|
||||
"require-from-string": "^2.0.2",
|
||||
"uri-js": "^4.4.1"
|
||||
},
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/epoberezkin"
|
||||
}
|
||||
},
|
||||
"node_modules/openapi-diff/node_modules/diff": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz",
|
||||
"integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==",
|
||||
"engines": {
|
||||
"node": ">=0.3.1"
|
||||
}
|
||||
},
|
||||
"node_modules/openapi-diff/node_modules/prettier": {
|
||||
"version": "3.2.5",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz",
|
||||
"integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==",
|
||||
"peer": true,
|
||||
"bin": {
|
||||
"prettier": "bin/prettier.cjs"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/prettier/prettier?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/openapi-diff/node_modules/yaml": {
|
||||
"version": "2.4.5",
|
||||
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.5.tgz",
|
||||
"integrity": "sha512-aBx2bnqDzVOyNKfsysjA2ms5ZlnjSAW2eG3/L5G/CSujfjLJTJsEw1bGw8kCf04KodQWk1pxlGnZ56CRxiawmg==",
|
||||
"peer": true,
|
||||
"bin": {
|
||||
"yaml": "bin.mjs"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 14"
|
||||
}
|
||||
},
|
||||
"node_modules/p-limit": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
|
||||
|
@ -2525,7 +2394,6 @@
|
|||
"version": "3.3.3",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz",
|
||||
"integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"prettier": "bin/prettier.cjs"
|
||||
},
|
||||
|
@ -3061,12 +2929,12 @@
|
|||
"integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ=="
|
||||
},
|
||||
"node_modules/tsx": {
|
||||
"version": "4.16.5",
|
||||
"resolved": "https://registry.npmjs.org/tsx/-/tsx-4.16.5.tgz",
|
||||
"integrity": "sha512-ArsiAQHEW2iGaqZ8fTA1nX0a+lN5mNTyuGRRO6OW3H/Yno1y9/t1f9YOI1Cfoqz63VAthn++ZYcbDP7jPflc+A==",
|
||||
"version": "4.17.0",
|
||||
"resolved": "https://registry.npmjs.org/tsx/-/tsx-4.17.0.tgz",
|
||||
"integrity": "sha512-eN4mnDA5UMKDt4YZixo9tBioibaMBpoxBkD+rIPAjVmYERSG0/dWEY1CEFuV89CgASlKL499q8AhmkMnnjtOJg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"esbuild": "~0.21.5",
|
||||
"esbuild": "~0.23.0",
|
||||
"get-tsconfig": "^4.7.5"
|
||||
},
|
||||
"bin": {
|
||||
|
@ -3104,8 +2972,7 @@
|
|||
"node_modules/undici-types": {
|
||||
"version": "5.26.5",
|
||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
|
||||
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
|
||||
"dev": true
|
||||
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA=="
|
||||
},
|
||||
"node_modules/unicorn-magic": {
|
||||
"version": "0.1.0",
|
||||
|
@ -3129,8 +2996,7 @@
|
|||
"node_modules/v8-compile-cache-lib": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz",
|
||||
"integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==",
|
||||
"dev": true
|
||||
"integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg=="
|
||||
},
|
||||
"node_modules/vscode-jsonrpc": {
|
||||
"version": "3.6.2",
|
||||
|
@ -3288,9 +3154,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/yaml": {
|
||||
"version": "2.4.5",
|
||||
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.5.tgz",
|
||||
"integrity": "sha512-aBx2bnqDzVOyNKfsysjA2ms5ZlnjSAW2eG3/L5G/CSujfjLJTJsEw1bGw8kCf04KodQWk1pxlGnZ56CRxiawmg==",
|
||||
"version": "2.5.0",
|
||||
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.5.0.tgz",
|
||||
"integrity": "sha512-2wWLbGbYDiSqqIKoPjar3MPgB94ErzCtrNE1FdqGuaO0pi2JGjmE8aW8TDZwzU7vuxcGRdL/4gPQwQ7hD5AMSw==",
|
||||
"bin": {
|
||||
"yaml": "bin.mjs"
|
||||
},
|
||||
|
@ -3351,7 +3217,6 @@
|
|||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz",
|
||||
"integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@azure-tools/typespec-client-generator-cli",
|
||||
"version": "0.11.1",
|
||||
"version": "0.11.2",
|
||||
"description": "A tool to generate Azure SDKs from TypeSpec",
|
||||
"main": "dist/index.js",
|
||||
"homepage": "https://github.com/Azure/azure-sdk-tools/tree/main/tools/tsp-client#readme",
|
||||
|
@ -51,14 +51,15 @@
|
|||
"typescript": "^5.1.6"
|
||||
},
|
||||
"dependencies": {
|
||||
"@autorest/openapi-to-typespec": "0.8.2",
|
||||
"@autorest/csharp": "https://aka.ms/azsdk/openapi-to-typespec-csharp",
|
||||
"@autorest/openapi-to-typespec": "0.8.2",
|
||||
"@azure-tools/typespec-autorest": "^0.44.0",
|
||||
"@azure/core-rest-pipeline": "^1.12.0",
|
||||
"@types/yargs": "^17.0.32",
|
||||
"autorest": "^3.7.1",
|
||||
"chalk": "^5.3.0",
|
||||
"dotenv": "^16.4.5",
|
||||
"openapi-diff": "github:tjprescott/openapi-diff#8edec5e2d2ad0ba57e8cdebda20e7b0c6e225699",
|
||||
"prompt-sync": "^4.2.0",
|
||||
"simple-git": "^3.20.0",
|
||||
"yaml": "^2.3.1",
|
||||
|
@ -71,6 +72,9 @@
|
|||
"extension": [
|
||||
"ts"
|
||||
],
|
||||
"bundleDependency": [
|
||||
"openapi-diff"
|
||||
],
|
||||
"spec": "test/*.spec.ts",
|
||||
"loader": "ts-node/esm"
|
||||
}
|
||||
|
|
|
@ -284,6 +284,18 @@ export async function generateCommand(argv: any) {
|
|||
}
|
||||
}
|
||||
|
||||
export async function compareCommand(argv: any, args: string[]) {
|
||||
let outputDir = argv["output-dir"];
|
||||
const openApiDiffPath = await getPathToDependency("openapi-diff");
|
||||
const command = [openApiDiffPath, ...args];
|
||||
try {
|
||||
await nodeCommand(outputDir, command);
|
||||
} catch (err) {
|
||||
Logger.error(`Error occurred while attempting to compare: ${err}`);
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
export async function updateCommand(argv: any) {
|
||||
const outputDir = argv["output-dir"];
|
||||
const repo = argv["repo"];
|
||||
|
|
|
@ -2,6 +2,7 @@ import yargs from "yargs/yargs";
|
|||
import { hideBin } from "yargs/helpers";
|
||||
import { checkDebugLogging, Logger, printBanner, usageText } from "./log.js";
|
||||
import {
|
||||
compareCommand,
|
||||
convertCommand,
|
||||
generateCommand,
|
||||
generateLockFileCommand,
|
||||
|
@ -227,6 +228,18 @@ const parser = yargs(hideBin(process.argv))
|
|||
await sortSwaggerCommand(argv);
|
||||
},
|
||||
)
|
||||
.command(
|
||||
"compare",
|
||||
"Compare two Swaggers for functional equivalency. This is typically used to compare a source Swagger with a TypeSpec project or TypeSpec generated Swagger to ensure that the TypeSpec project is functionally equivalent to the source Swagger.",
|
||||
(yargs: any) => {
|
||||
return yargs.help(false);
|
||||
},
|
||||
async (argv: any) => {
|
||||
argv["output-dir"] = resolveOutputDir(argv);
|
||||
const rawArgs = process.argv.slice(3);
|
||||
await compareCommand(argv, rawArgs);
|
||||
},
|
||||
)
|
||||
.demandCommand(1, "Please provide a command.")
|
||||
.help()
|
||||
.showHelpOnFail(true);
|
||||
|
|
|
@ -0,0 +1,56 @@
|
|||
import "@azure-tools/typespec-azure-core";
|
||||
import "@azure-tools/typespec-azure-resource-manager";
|
||||
import "@typespec/openapi";
|
||||
import "@typespec/rest";
|
||||
import "./models.tsp";
|
||||
import "./CodeSigningAccount.tsp";
|
||||
|
||||
using TypeSpec.Rest;
|
||||
using Azure.ResourceManager;
|
||||
using TypeSpec.Http;
|
||||
using TypeSpec.OpenAPI;
|
||||
|
||||
namespace Microsoft.CodeSigning;
|
||||
@doc("Certificate profile resource.")
|
||||
@parentResource(CodeSigningAccount)
|
||||
model CertificateProfile is ProxyResource<CertificateProfileProperties> {
|
||||
@doc("Certificate profile name.")
|
||||
@pattern("^(?=.{5,100}$)[^0-9][A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")
|
||||
@path
|
||||
@key("profileName")
|
||||
@segment("certificateProfiles")
|
||||
name: string;
|
||||
}
|
||||
|
||||
@armResourceOperations
|
||||
interface CertificateProfiles {
|
||||
@doc("Get details of a certificate profile.")
|
||||
get is ArmResourceRead<CertificateProfile>;
|
||||
|
||||
#suppress "@azure-tools/typespec-azure-core/invalid-final-state" "MUST CHANGE ON NEXT UPDATE"
|
||||
@doc("Create a certificate profile.")
|
||||
@Azure.Core.useFinalStateVia("azure-async-operation")
|
||||
create is ArmResourceCreateOrReplaceAsync<
|
||||
CertificateProfile,
|
||||
LroHeaders = Azure.Core.Foundations.RetryAfterHeader
|
||||
>;
|
||||
|
||||
@doc("Delete a certificate profile.")
|
||||
delete is ArmResourceDeleteWithoutOkAsync<CertificateProfile>;
|
||||
|
||||
@doc("List certificate profiles under a trusted signing account.")
|
||||
listByCodeSigningAccount is ArmResourceListByParent<CertificateProfile>;
|
||||
|
||||
@doc("Revoke a certificate under a certificate profile.")
|
||||
revokeCertificate is ArmResourceActionNoContentSync<
|
||||
CertificateProfile,
|
||||
RevokeCertificate
|
||||
>;
|
||||
}
|
||||
|
||||
@@doc(CertificateProfiles.create::parameters.resource,
|
||||
"Parameters to create the certificate profile"
|
||||
);
|
||||
@@doc(CertificateProfiles.revokeCertificate::parameters.body,
|
||||
"Parameters to revoke the certificate profile"
|
||||
);
|
|
@ -0,0 +1,61 @@
|
|||
import "@azure-tools/typespec-azure-core";
|
||||
import "@azure-tools/typespec-azure-resource-manager";
|
||||
import "@typespec/openapi";
|
||||
import "@typespec/rest";
|
||||
import "./models.tsp";
|
||||
|
||||
using TypeSpec.Rest;
|
||||
using Azure.ResourceManager;
|
||||
using TypeSpec.Http;
|
||||
using TypeSpec.OpenAPI;
|
||||
|
||||
namespace Microsoft.CodeSigning;
|
||||
@doc("Trusted signing account resource.")
|
||||
model CodeSigningAccount is TrackedResource<CodeSigningAccountProperties> {
|
||||
@doc("Trusted Signing account name.")
|
||||
@pattern("^(?=.{3,24}$)[^0-9][A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")
|
||||
@path
|
||||
@key("accountName")
|
||||
@segment("codeSigningAccounts")
|
||||
name: string;
|
||||
}
|
||||
|
||||
@armResourceOperations
|
||||
interface CodeSigningAccounts {
|
||||
@doc("Get a trusted Signing Account.")
|
||||
get is ArmResourceRead<CodeSigningAccount>;
|
||||
|
||||
#suppress "@azure-tools/typespec-azure-core/invalid-final-state" "MUST CHANGE ON NEXT UPDATE"
|
||||
@doc("Create a trusted Signing Account.")
|
||||
@Azure.Core.useFinalStateVia("azure-async-operation")
|
||||
create is ArmResourceCreateOrReplaceAsync<
|
||||
CodeSigningAccount,
|
||||
LroHeaders = Azure.Core.Foundations.RetryAfterHeader
|
||||
>;
|
||||
|
||||
@doc("Update a trusted signing account.")
|
||||
@parameterVisibility
|
||||
update is ArmCustomPatchAsync<CodeSigningAccount, CodeSigningAccountPatch>;
|
||||
|
||||
@doc("Delete a trusted signing account.")
|
||||
delete is ArmResourceDeleteWithoutOkAsync<CodeSigningAccount>;
|
||||
|
||||
@doc("Lists trusted signing accounts within a resource group.")
|
||||
listByResourceGroup is ArmResourceListByParent<CodeSigningAccount>;
|
||||
|
||||
@doc("Lists trusted signing accounts within a subscription.")
|
||||
listBySubscription is ArmListBySubscription<CodeSigningAccount>;
|
||||
|
||||
@doc("Checks that the trusted signing account name is valid and is not already in use.")
|
||||
checkNameAvailability is checkGlobalNameAvailability<
|
||||
CheckNameAvailability,
|
||||
CheckNameAvailabilityResult
|
||||
>;
|
||||
}
|
||||
|
||||
@@doc(CodeSigningAccounts.create::parameters.resource,
|
||||
"Parameters to create the trusted signing account"
|
||||
);
|
||||
@@doc(CodeSigningAccounts.update::parameters.properties,
|
||||
"Parameters supplied to update the trusted signing account"
|
||||
);
|
|
@ -0,0 +1,31 @@
|
|||
import "@typespec/rest";
|
||||
import "@typespec/versioning";
|
||||
import "@azure-tools/typespec-azure-core";
|
||||
import "@azure-tools/typespec-azure-resource-manager";
|
||||
import "./models.tsp";
|
||||
import "./CodeSigningAccount.tsp";
|
||||
import "./CertificateProfile.tsp";
|
||||
|
||||
using TypeSpec.Rest;
|
||||
using TypeSpec.Http;
|
||||
using Azure.ResourceManager.Foundations;
|
||||
using Azure.Core;
|
||||
using Azure.ResourceManager;
|
||||
using TypeSpec.Versioning;
|
||||
|
||||
@doc("Code Signing resource provider api.")
|
||||
@armProviderNamespace("Microsoft.CodeSigning")
|
||||
@service({
|
||||
title: "CodeSigningManagementClient",
|
||||
})
|
||||
@versioned(Versions)
|
||||
@armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v5)
|
||||
namespace Microsoft.CodeSigning;
|
||||
|
||||
@doc("The available API versions.")
|
||||
enum Versions {
|
||||
@doc("The 2024-02-05-preview API version.")
|
||||
@useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1)
|
||||
@useDependency(Azure.Core.Versions.v1_0_Preview_1)
|
||||
v2024_02_05_preview: "2024-02-05-preview",
|
||||
}
|
|
@ -0,0 +1,319 @@
|
|||
import "@typespec/rest";
|
||||
import "@typespec/http";
|
||||
import "@azure-tools/typespec-azure-core";
|
||||
import "@typespec/openapi";
|
||||
import "@azure-tools/typespec-azure-resource-manager";
|
||||
|
||||
using TypeSpec.Rest;
|
||||
using TypeSpec.Http;
|
||||
using Azure.Core;
|
||||
using TypeSpec.OpenAPI;
|
||||
using Azure.ResourceManager;
|
||||
using Azure.ResourceManager.Foundations;
|
||||
|
||||
namespace Microsoft.CodeSigning;
|
||||
|
||||
interface Operations extends Azure.ResourceManager.Operations {}
|
||||
|
||||
@doc("The status of the current operation.")
|
||||
union ProvisioningState {
|
||||
string,
|
||||
|
||||
@doc("Resource has been created.")
|
||||
Succeeded: "Succeeded",
|
||||
|
||||
@doc("Resource creation failed.")
|
||||
Failed: "Failed",
|
||||
|
||||
@doc("Resource creation was canceled.")
|
||||
Canceled: "Canceled",
|
||||
|
||||
@doc("Updating in progress.")
|
||||
Updating: "Updating",
|
||||
|
||||
@doc("Deletion in progress.")
|
||||
Deleting: "Deleting",
|
||||
|
||||
@doc("Resource creation started.")
|
||||
Accepted: "Accepted",
|
||||
}
|
||||
|
||||
@doc("Type of the certificate")
|
||||
union ProfileType {
|
||||
string,
|
||||
|
||||
@doc("Used for signing files which are distributed publicly.")
|
||||
PublicTrust: "PublicTrust",
|
||||
|
||||
@doc("Used for signing files which are distributed internally within organization or group boundary.")
|
||||
PrivateTrust: "PrivateTrust",
|
||||
|
||||
@doc("Used for signing CI policy files.")
|
||||
PrivateTrustCIPolicy: "PrivateTrustCIPolicy",
|
||||
|
||||
@doc("Used for signing files which are run in secure vbs enclave.")
|
||||
VBSEnclave: "VBSEnclave",
|
||||
|
||||
@doc("Used for signing files for testing purpose.")
|
||||
PublicTrustTest: "PublicTrustTest",
|
||||
}
|
||||
|
||||
@doc("Status of the certificate profiles.")
|
||||
union CertificateProfileStatus {
|
||||
string,
|
||||
|
||||
@doc("The certificate profile is active.")
|
||||
Active: "Active",
|
||||
|
||||
@doc("The certificate profile is disabled.")
|
||||
Disabled: "Disabled",
|
||||
|
||||
@doc("The certificate profile is suspended.")
|
||||
Suspended: "Suspended",
|
||||
}
|
||||
|
||||
@doc("Status of the certificate")
|
||||
union CertificateStatus {
|
||||
string,
|
||||
|
||||
@doc("The certificate is active.")
|
||||
Active: "Active",
|
||||
|
||||
@doc("The certificate is expired.")
|
||||
Expired: "Expired",
|
||||
|
||||
@doc("The certificate is revoked.")
|
||||
Revoked: "Revoked",
|
||||
}
|
||||
|
||||
@doc("Revocation status of the certificate.")
|
||||
union RevocationStatus {
|
||||
string,
|
||||
|
||||
@doc("Certificate revocation succeeded.")
|
||||
Succeeded: "Succeeded",
|
||||
|
||||
@doc("Certificate revocation is in progress.")
|
||||
InProgress: "InProgress",
|
||||
|
||||
@doc("Certificate revocation failed.")
|
||||
Failed: "Failed",
|
||||
}
|
||||
|
||||
@doc("Name of the sku.")
|
||||
union SkuName {
|
||||
string,
|
||||
|
||||
@doc("Basic sku.")
|
||||
Basic: "Basic",
|
||||
|
||||
@doc("Premium sku.")
|
||||
Premium: "Premium",
|
||||
}
|
||||
|
||||
@doc("The reason that a trusted signing account name could not be used. The Reason element is only returned if nameAvailable is false.")
|
||||
union NameUnavailabilityReason {
|
||||
string,
|
||||
|
||||
@doc("Account name is invalid")
|
||||
AccountNameInvalid: "AccountNameInvalid",
|
||||
|
||||
@doc("Account name already exists")
|
||||
AlreadyExists: "AlreadyExists",
|
||||
}
|
||||
|
||||
@doc("Properties of the trusted signing account.")
|
||||
model CodeSigningAccountProperties {
|
||||
@doc("The URI of the trusted signing account which is used during signing files.")
|
||||
@visibility("read")
|
||||
accountUri?: string;
|
||||
|
||||
@doc("SKU of the trusted signing account.")
|
||||
sku?: AccountSku;
|
||||
|
||||
@doc("Status of the current operation on trusted signing account.")
|
||||
@visibility("read")
|
||||
provisioningState?: ProvisioningState;
|
||||
}
|
||||
|
||||
@doc("SKU of the trusted signing account.")
|
||||
model AccountSku {
|
||||
@doc("Name of the SKU.")
|
||||
name: SkuName;
|
||||
}
|
||||
|
||||
@doc("Parameters for creating or updating a trusted signing account.")
|
||||
model CodeSigningAccountPatch {
|
||||
@doc("Resource tags.")
|
||||
tags?: Record<string>;
|
||||
|
||||
@doc("Properties of the trusted signing account.")
|
||||
@extension("x-ms-client-flatten", true)
|
||||
properties?: CodeSigningAccountPatchProperties;
|
||||
}
|
||||
|
||||
@doc("Properties of the trusted signing account.")
|
||||
model CodeSigningAccountPatchProperties {
|
||||
@doc("SKU of the trusted signing account.")
|
||||
sku?: AccountSku;
|
||||
}
|
||||
|
||||
@doc("Properties of the certificate profile.")
|
||||
model CertificateProfileProperties {
|
||||
@doc("Profile type of the certificate.")
|
||||
profileType: ProfileType;
|
||||
|
||||
@doc("Used as CN in the certificate subject name.")
|
||||
@visibility("read")
|
||||
commonName?: string;
|
||||
|
||||
@doc("Used as O in the certificate subject name.")
|
||||
@visibility("read")
|
||||
organization?: string;
|
||||
|
||||
@doc("Used as OU in the private trust certificate subject name.")
|
||||
@visibility("read")
|
||||
organizationUnit?: string;
|
||||
|
||||
@doc("Used as STREET in the certificate subject name.")
|
||||
@visibility("read")
|
||||
streetAddress?: string;
|
||||
|
||||
@doc("Whether to include STREET in the certificate subject name.")
|
||||
includeStreetAddress?: boolean = false;
|
||||
|
||||
@doc("Used as L in the certificate subject name.")
|
||||
@visibility("read")
|
||||
city?: string;
|
||||
|
||||
@doc("Whether to include L in the certificate subject name. Applicable only for private trust, private trust ci profile types")
|
||||
includeCity?: boolean = false;
|
||||
|
||||
@doc("Used as S in the certificate subject name.")
|
||||
@visibility("read")
|
||||
state?: string;
|
||||
|
||||
@doc("Whether to include S in the certificate subject name. Applicable only for private trust, private trust ci profile types")
|
||||
includeState?: boolean = false;
|
||||
|
||||
@doc("Used as C in the certificate subject name.")
|
||||
@visibility("read")
|
||||
country?: string;
|
||||
|
||||
@doc("Whether to include C in the certificate subject name. Applicable only for private trust, private trust ci profile types")
|
||||
includeCountry?: boolean = false;
|
||||
|
||||
@doc("Used as PC in the certificate subject name.")
|
||||
@visibility("read")
|
||||
postalCode?: string;
|
||||
|
||||
@doc("Whether to include PC in the certificate subject name.")
|
||||
includePostalCode?: boolean = false;
|
||||
|
||||
@doc("Enhanced key usage of the certificate.")
|
||||
@visibility("read")
|
||||
enhancedKeyUsage?: string;
|
||||
|
||||
@doc("Identity validation id used for the certificate subject name.")
|
||||
identityValidationId?: string;
|
||||
|
||||
@doc("Status of the current operation on certificate profile.")
|
||||
@visibility("read")
|
||||
provisioningState?: ProvisioningState;
|
||||
|
||||
@doc("Status of the certificate profile.")
|
||||
@visibility("read")
|
||||
status?: CertificateProfileStatus;
|
||||
|
||||
@doc("List of renewed certificates.")
|
||||
@visibility("read")
|
||||
@extension("x-ms-identifiers", [])
|
||||
@extension("x-ms-client-flatten", true)
|
||||
certificates?: Certificate[];
|
||||
}
|
||||
|
||||
@doc("Properties of the certificate.")
|
||||
model Certificate {
|
||||
@doc("Serial number of the certificate.")
|
||||
serialNumber?: string;
|
||||
|
||||
@doc("Subject name of the certificate.")
|
||||
subjectName?: string;
|
||||
|
||||
@doc("Thumbprint of the certificate.")
|
||||
thumbprint?: string;
|
||||
|
||||
@doc("Certificate created date.")
|
||||
createdDate?: string;
|
||||
|
||||
@doc("Certificate expiry date.")
|
||||
expiryDate?: string;
|
||||
|
||||
@doc("Status of the certificate.")
|
||||
status?: CertificateStatus;
|
||||
|
||||
@doc("Revocations history of a certificate.")
|
||||
@extension("x-ms-client-flatten", true)
|
||||
revocation?: Revocation;
|
||||
}
|
||||
|
||||
@doc("Revocation details of the certificate.")
|
||||
model Revocation {
|
||||
@doc("The timestamp when the revocation is requested.")
|
||||
requestedAt?: utcDateTime;
|
||||
|
||||
@doc("The timestamp when the revocation is effective.")
|
||||
effectiveAt?: utcDateTime;
|
||||
|
||||
@doc("Reason for revocation.")
|
||||
reason?: string;
|
||||
|
||||
@doc("Remarks for the revocation.")
|
||||
remarks?: string;
|
||||
|
||||
@doc("Status of the revocation.")
|
||||
status?: RevocationStatus;
|
||||
|
||||
@doc("Reason for the revocation failure.")
|
||||
failureReason?: string;
|
||||
}
|
||||
|
||||
@doc("Defines the certificate revocation properties.")
|
||||
model RevokeCertificate {
|
||||
@doc("Serial number of the certificate.")
|
||||
serialNumber: string;
|
||||
|
||||
@doc("Thumbprint of the certificate.")
|
||||
thumbprint: string;
|
||||
|
||||
// FIXME: (utcDateTime) Please double check that this is the correct type for your scenario.
|
||||
@doc("The timestamp when the revocation is effective.")
|
||||
effectiveAt: utcDateTime;
|
||||
|
||||
@doc("Reason for the revocation.")
|
||||
reason: string;
|
||||
|
||||
@doc("Remarks for the revocation.")
|
||||
remarks?: string;
|
||||
}
|
||||
|
||||
@doc("The parameters used to check the availability of the trusted signing account name.")
|
||||
model CheckNameAvailability {
|
||||
@doc("Trusted signing account name.")
|
||||
name: string;
|
||||
}
|
||||
|
||||
@doc("The CheckNameAvailability operation response.")
|
||||
model CheckNameAvailabilityResult {
|
||||
@doc("A boolean value that indicates whether the name is available for you to use. If true, the name is available. If false, the name has already been taken or is invalid and cannot be used.")
|
||||
@visibility("read")
|
||||
nameAvailable?: boolean;
|
||||
|
||||
@doc("The reason that a trusted signing account name could not be used. The Reason element is only returned if nameAvailable is false.")
|
||||
@visibility("read")
|
||||
reason?: NameUnavailabilityReason;
|
||||
|
||||
@doc("An error message explaining the Reason value in more detail.")
|
||||
@visibility("read")
|
||||
message?: string;
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
emit:
|
||||
- "@azure-tools/typespec-autorest"
|
||||
options:
|
||||
"@azure-tools/typespec-autorest":
|
||||
use-read-only-status-schema: true
|
||||
emitter-output-dir: "{project-root}/.."
|
||||
azure-resource-provider-folder: "resource-manager"
|
||||
emit-common-types-schema: "never"
|
||||
# `arm-resource-flattening` is only used for back-compat for specs existed on July 2024. All new service spec should NOT use this flag
|
||||
arm-resource-flattening: true
|
||||
output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/codeSigningAccount.json"
|
||||
examples-directory: "{project-root}/examples"
|
||||
linter:
|
||||
extends:
|
||||
- "@azure-tools/typespec-azure-rulesets/resource-manager"
|
|
@ -0,0 +1,722 @@
|
|||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"version": "5.0",
|
||||
"title": "Common types"
|
||||
},
|
||||
"paths": {},
|
||||
"definitions": {
|
||||
"Resource": {
|
||||
"title": "Resource",
|
||||
"description": "Common fields that are returned in the response for all Azure Resource Manager resources",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"readOnly": true,
|
||||
"type": "string",
|
||||
"format": "arm-id",
|
||||
"description": "Fully qualified resource ID for the resource. E.g. \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}\""
|
||||
},
|
||||
"name": {
|
||||
"readOnly": true,
|
||||
"type": "string",
|
||||
"description": "The name of the resource"
|
||||
},
|
||||
"type": {
|
||||
"readOnly": true,
|
||||
"type": "string",
|
||||
"description": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\""
|
||||
},
|
||||
"systemData": {
|
||||
"readOnly": true,
|
||||
"description": "Azure Resource Manager metadata containing createdBy and modifiedBy information.",
|
||||
"$ref": "#/definitions/systemData"
|
||||
}
|
||||
},
|
||||
"x-ms-azure-resource": true
|
||||
},
|
||||
"AzureEntityResource": {
|
||||
"x-ms-client-name": "AzureEntityResource",
|
||||
"title": "Entity Resource",
|
||||
"description": "The resource model definition for an Azure Resource Manager resource with an etag.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"etag": {
|
||||
"type": "string",
|
||||
"readOnly": true,
|
||||
"description": "Resource Etag."
|
||||
}
|
||||
},
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/Resource"
|
||||
}
|
||||
]
|
||||
},
|
||||
"TrackedResource": {
|
||||
"title": "Tracked Resource",
|
||||
"description": "The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"tags": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
},
|
||||
"x-ms-mutability": [
|
||||
"read",
|
||||
"create",
|
||||
"update"
|
||||
],
|
||||
"description": "Resource tags."
|
||||
},
|
||||
"location": {
|
||||
"type": "string",
|
||||
"x-ms-mutability": [
|
||||
"read",
|
||||
"create"
|
||||
],
|
||||
"description": "The geo-location where the resource lives"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"location"
|
||||
],
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/Resource"
|
||||
}
|
||||
]
|
||||
},
|
||||
"ProxyResource": {
|
||||
"title": "Proxy Resource",
|
||||
"description": "The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location",
|
||||
"type": "object",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/Resource"
|
||||
}
|
||||
]
|
||||
},
|
||||
"ResourceModelWithAllowedPropertySet": {
|
||||
"description": "The resource model definition containing the full set of allowed properties for a resource. Except properties bag, there cannot be a top level property outside of this set.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"managedBy": {
|
||||
"type": "string",
|
||||
"x-ms-mutability": [
|
||||
"read",
|
||||
"create",
|
||||
"update"
|
||||
],
|
||||
"description": "The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another Azure resource. If this is present, complete mode deployment will not delete the resource if it is removed from the template since it is managed by another resource."
|
||||
},
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"x-ms-mutability": [
|
||||
"read",
|
||||
"create"
|
||||
],
|
||||
"description": "Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. E.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value.",
|
||||
"pattern": "^[-\\w\\._,\\(\\)]+$"
|
||||
},
|
||||
"etag": {
|
||||
"readOnly": true,
|
||||
"type": "string",
|
||||
"description": "The etag field is *not* required. If it is provided in the response body, it must also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. "
|
||||
},
|
||||
"identity": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/Identity"
|
||||
}
|
||||
]
|
||||
},
|
||||
"sku": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/Sku"
|
||||
}
|
||||
]
|
||||
},
|
||||
"plan": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/Plan"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TrackedResource"
|
||||
}
|
||||
],
|
||||
"x-ms-azure-resource": true
|
||||
},
|
||||
"SkuTier": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"Free",
|
||||
"Basic",
|
||||
"Standard",
|
||||
"Premium"
|
||||
],
|
||||
"x-ms-enum": {
|
||||
"name": "SkuTier",
|
||||
"modelAsString": false
|
||||
},
|
||||
"description": "This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT."
|
||||
},
|
||||
"Sku": {
|
||||
"description": "The resource model definition representing SKU",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "The name of the SKU. E.g. P3. It is typically a letter+number code"
|
||||
},
|
||||
"tier": {
|
||||
"$ref": "#/definitions/SkuTier"
|
||||
},
|
||||
"size": {
|
||||
"type": "string",
|
||||
"description": "The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. "
|
||||
},
|
||||
"family": {
|
||||
"type": "string",
|
||||
"description": "If the service has different generations of hardware, for the same SKU, then that can be captured here."
|
||||
},
|
||||
"capacity": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"description": "If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"name"
|
||||
]
|
||||
},
|
||||
"Identity": {
|
||||
"description": "Identity for the resource.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"principalId": {
|
||||
"readOnly": true,
|
||||
"type": "string",
|
||||
"format": "uuid",
|
||||
"description": "The principal ID of resource identity. The value must be an UUID."
|
||||
},
|
||||
"tenantId": {
|
||||
"readOnly": true,
|
||||
"type": "string",
|
||||
"format": "uuid",
|
||||
"description": "The tenant ID of resource. The value must be an UUID."
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"description": "The identity type.",
|
||||
"enum": [
|
||||
"SystemAssigned"
|
||||
],
|
||||
"x-ms-enum": {
|
||||
"name": "ResourceIdentityType",
|
||||
"modelAsString": false
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Plan": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "A user defined name of the 3rd Party Artifact that is being procured."
|
||||
},
|
||||
"publisher": {
|
||||
"type": "string",
|
||||
"description": "The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic"
|
||||
},
|
||||
"product": {
|
||||
"type": "string",
|
||||
"description": "The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at the time of Data Market onboarding. "
|
||||
},
|
||||
"promotionCode": {
|
||||
"type": "string",
|
||||
"description": "A publisher provided promotion code as provisioned in Data Market for the said product/artifact."
|
||||
},
|
||||
"version": {
|
||||
"type": "string",
|
||||
"description": "The version of the desired product/artifact."
|
||||
}
|
||||
},
|
||||
"description": "Plan for the resource.",
|
||||
"required": [
|
||||
"name",
|
||||
"publisher",
|
||||
"product"
|
||||
]
|
||||
},
|
||||
"ErrorDetail": {
|
||||
"description": "The error detail.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"readOnly": true,
|
||||
"type": "string",
|
||||
"description": "The error code."
|
||||
},
|
||||
"message": {
|
||||
"readOnly": true,
|
||||
"type": "string",
|
||||
"description": "The error message."
|
||||
},
|
||||
"target": {
|
||||
"readOnly": true,
|
||||
"type": "string",
|
||||
"description": "The error target."
|
||||
},
|
||||
"details": {
|
||||
"readOnly": true,
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/ErrorDetail"
|
||||
},
|
||||
"x-ms-identifiers": [
|
||||
"message",
|
||||
"target"
|
||||
],
|
||||
"description": "The error details."
|
||||
},
|
||||
"additionalInfo": {
|
||||
"readOnly": true,
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/ErrorAdditionalInfo"
|
||||
},
|
||||
"x-ms-identifiers": [],
|
||||
"description": "The error additional info."
|
||||
}
|
||||
}
|
||||
},
|
||||
"ErrorResponse": {
|
||||
"title": "Error response",
|
||||
"description": "Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"error": {
|
||||
"description": "The error object.",
|
||||
"$ref": "#/definitions/ErrorDetail"
|
||||
}
|
||||
}
|
||||
},
|
||||
"ErrorAdditionalInfo": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"readOnly": true,
|
||||
"type": "string",
|
||||
"description": "The additional info type."
|
||||
},
|
||||
"info": {
|
||||
"readOnly": true,
|
||||
"type": "object",
|
||||
"description": "The additional info."
|
||||
}
|
||||
},
|
||||
"description": "The resource management error additional info."
|
||||
},
|
||||
"Operation": {
|
||||
"title": "REST API Operation",
|
||||
"description": "Details of a REST API operation, returned from the Resource Provider Operations API",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"description": "The name of the operation, as per Resource-Based Access Control (RBAC). Examples: \"Microsoft.Compute/virtualMachines/write\", \"Microsoft.Compute/virtualMachines/capture/action\"",
|
||||
"type": "string",
|
||||
"readOnly": true
|
||||
},
|
||||
"isDataAction": {
|
||||
"description": "Whether the operation applies to data-plane. This is \"true\" for data-plane operations and \"false\" for ARM/control-plane operations.",
|
||||
"type": "boolean",
|
||||
"readOnly": true
|
||||
},
|
||||
"display": {
|
||||
"description": "Localized display information for this particular operation.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"provider": {
|
||||
"description": "The localized friendly form of the resource provider name, e.g. \"Microsoft Monitoring Insights\" or \"Microsoft Compute\".",
|
||||
"type": "string",
|
||||
"readOnly": true
|
||||
},
|
||||
"resource": {
|
||||
"description": "The localized friendly name of the resource type related to this operation. E.g. \"Virtual Machines\" or \"Job Schedule Collections\".",
|
||||
"type": "string",
|
||||
"readOnly": true
|
||||
},
|
||||
"operation": {
|
||||
"description": "The concise, localized friendly name for the operation; suitable for dropdowns. E.g. \"Create or Update Virtual Machine\", \"Restart Virtual Machine\".",
|
||||
"type": "string",
|
||||
"readOnly": true
|
||||
},
|
||||
"description": {
|
||||
"description": "The short, localized friendly description of the operation; suitable for tool tips and detailed views.",
|
||||
"type": "string",
|
||||
"readOnly": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"origin": {
|
||||
"description": "The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"",
|
||||
"type": "string",
|
||||
"readOnly": true,
|
||||
"enum": [
|
||||
"user",
|
||||
"system",
|
||||
"user,system"
|
||||
],
|
||||
"x-ms-enum": {
|
||||
"name": "Origin",
|
||||
"modelAsString": true
|
||||
}
|
||||
},
|
||||
"actionType": {
|
||||
"description": "Enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.",
|
||||
"type": "string",
|
||||
"readOnly": true,
|
||||
"enum": [
|
||||
"Internal"
|
||||
],
|
||||
"x-ms-enum": {
|
||||
"name": "ActionType",
|
||||
"modelAsString": true
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"OperationListResult": {
|
||||
"description": "A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"value": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/Operation"
|
||||
},
|
||||
"x-ms-identifiers": [
|
||||
"name"
|
||||
],
|
||||
"description": "List of operations supported by the resource provider",
|
||||
"readOnly": true
|
||||
},
|
||||
"nextLink": {
|
||||
"type": "string",
|
||||
"format": "uri",
|
||||
"description": "URL to get the next set of operation list results (if there are any).",
|
||||
"readOnly": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"OperationStatusResult": {
|
||||
"description": "The current status of an async operation.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"status"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "Fully qualified ID for the async operation.",
|
||||
"type": "string",
|
||||
"format": "arm-id"
|
||||
},
|
||||
"resourceId": {
|
||||
"description": "Fully qualified ID of the resource against which the original async operation was started.",
|
||||
"type": "string",
|
||||
"format": "arm-id",
|
||||
"readOnly": true
|
||||
},
|
||||
"name": {
|
||||
"description": "Name of the async operation.",
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"description": "Operation status.",
|
||||
"type": "string"
|
||||
},
|
||||
"percentComplete": {
|
||||
"description": "Percent of the operation that is complete.",
|
||||
"type": "number",
|
||||
"minimum": 0,
|
||||
"maximum": 100
|
||||
},
|
||||
"startTime": {
|
||||
"description": "The start time of the operation.",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"endTime": {
|
||||
"description": "The end time of the operation.",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"operations": {
|
||||
"description": "The operations list.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/OperationStatusResult"
|
||||
}
|
||||
},
|
||||
"error": {
|
||||
"description": "If present, details of the operation error.",
|
||||
"$ref": "#/definitions/ErrorDetail"
|
||||
}
|
||||
}
|
||||
},
|
||||
"locationData": {
|
||||
"description": "Metadata pertaining to the geographic location of the resource.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"maxLength": 256,
|
||||
"description": "A canonical name for the geographic or physical location."
|
||||
},
|
||||
"city": {
|
||||
"type": "string",
|
||||
"description": "The city or locality where the resource is located."
|
||||
},
|
||||
"district": {
|
||||
"type": "string",
|
||||
"description": "The district, state, or province where the resource is located."
|
||||
},
|
||||
"countryOrRegion": {
|
||||
"type": "string",
|
||||
"description": "The country or region where the resource is located"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"name"
|
||||
]
|
||||
},
|
||||
"systemData": {
|
||||
"description": "Metadata pertaining to creation and last modification of the resource.",
|
||||
"type": "object",
|
||||
"readOnly": true,
|
||||
"properties": {
|
||||
"createdBy": {
|
||||
"type": "string",
|
||||
"description": "The identity that created the resource."
|
||||
},
|
||||
"createdByType": {
|
||||
"type": "string",
|
||||
"description": "The type of identity that created the resource.",
|
||||
"enum": [
|
||||
"User",
|
||||
"Application",
|
||||
"ManagedIdentity",
|
||||
"Key"
|
||||
],
|
||||
"x-ms-enum": {
|
||||
"name": "createdByType",
|
||||
"modelAsString": true
|
||||
}
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"description": "The timestamp of resource creation (UTC)."
|
||||
},
|
||||
"lastModifiedBy": {
|
||||
"type": "string",
|
||||
"description": "The identity that last modified the resource."
|
||||
},
|
||||
"lastModifiedByType": {
|
||||
"type": "string",
|
||||
"description": "The type of identity that last modified the resource.",
|
||||
"enum": [
|
||||
"User",
|
||||
"Application",
|
||||
"ManagedIdentity",
|
||||
"Key"
|
||||
],
|
||||
"x-ms-enum": {
|
||||
"name": "createdByType",
|
||||
"modelAsString": true
|
||||
}
|
||||
},
|
||||
"lastModifiedAt": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"description": "The timestamp of resource last modification (UTC)"
|
||||
}
|
||||
}
|
||||
},
|
||||
"encryptionProperties": {
|
||||
"description": "Configuration of key for data encryption",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"status": {
|
||||
"description": "Indicates whether or not the encryption is enabled for container registry.",
|
||||
"enum": [
|
||||
"enabled",
|
||||
"disabled"
|
||||
],
|
||||
"type": "string",
|
||||
"x-ms-enum": {
|
||||
"name": "EncryptionStatus",
|
||||
"modelAsString": true
|
||||
}
|
||||
},
|
||||
"keyVaultProperties": {
|
||||
"$ref": "#/definitions/KeyVaultProperties",
|
||||
"description": "Key vault properties."
|
||||
}
|
||||
}
|
||||
},
|
||||
"KeyVaultProperties": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"keyIdentifier": {
|
||||
"description": "Key vault uri to access the encryption key.",
|
||||
"type": "string"
|
||||
},
|
||||
"identity": {
|
||||
"description": "The client ID of the identity which will be used to access key vault.",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"CheckNameAvailabilityRequest": {
|
||||
"description": "The check availability request body.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"description": "The name of the resource for which availability needs to be checked.",
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"description": "The resource type.",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"CheckNameAvailabilityResponse": {
|
||||
"description": "The check availability result.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"nameAvailable": {
|
||||
"description": "Indicates if the resource name is available.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"reason": {
|
||||
"description": "The reason why the given name is not available.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"Invalid",
|
||||
"AlreadyExists"
|
||||
],
|
||||
"x-ms-enum": {
|
||||
"name": "CheckNameAvailabilityReason",
|
||||
"modelAsString": true
|
||||
}
|
||||
},
|
||||
"message": {
|
||||
"description": "Detailed reason why the given name is available.",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": {
|
||||
"SubscriptionIdParameter": {
|
||||
"name": "subscriptionId",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"format": "uuid",
|
||||
"description": "The ID of the target subscription. The value must be an UUID."
|
||||
},
|
||||
"ApiVersionParameter": {
|
||||
"name": "api-version",
|
||||
"in": "query",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"description": "The API version to use for this operation.",
|
||||
"minLength": 1
|
||||
},
|
||||
"ResourceGroupNameParameter": {
|
||||
"name": "resourceGroupName",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"description": "The name of the resource group. The name is case insensitive.",
|
||||
"minLength": 1,
|
||||
"maxLength": 90,
|
||||
"x-ms-parameter-location": "method"
|
||||
},
|
||||
"ManagementGroupNameParameter": {
|
||||
"name": "managementGroupName",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"description": "The name of the management group. The name is case insensitive.",
|
||||
"minLength": 1,
|
||||
"maxLength": 90,
|
||||
"x-ms-parameter-location": "method"
|
||||
},
|
||||
"ScopeParameter": {
|
||||
"name": "scope",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"description": "The scope at which the operation is performed.",
|
||||
"minLength": 1,
|
||||
"x-ms-parameter-location": "method",
|
||||
"x-ms-skip-url-encoding": true
|
||||
},
|
||||
"TenantIdParameter": {
|
||||
"name": "tenantId",
|
||||
"in": "path",
|
||||
"description": "The Azure tenant ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"format": "uuid",
|
||||
"x-ms-parameter-location": "method"
|
||||
},
|
||||
"OperationIdParameter": {
|
||||
"name": "operationId",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"description": "The ID of an ongoing async operation.",
|
||||
"minLength": 1,
|
||||
"x-ms-parameter-location": "method"
|
||||
},
|
||||
"LocationParameter": {
|
||||
"name": "location",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"description": "The name of the Azure region.",
|
||||
"minLength": 1,
|
||||
"x-ms-parameter-location": "method"
|
||||
},
|
||||
"If-Match": {
|
||||
"name": "ifMatch",
|
||||
"in": "header",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"description": "The If-Match header that makes a request conditional.",
|
||||
"x-ms-parameter-location": "method"
|
||||
},
|
||||
"If-None-Match": {
|
||||
"name": "ifNoneMatch",
|
||||
"in": "header",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"description": "The If-None-Match header that makes a request conditional.",
|
||||
"x-ms-parameter-location": "method"
|
||||
}
|
||||
}
|
||||
}
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,722 @@
|
|||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"version": "5.0",
|
||||
"title": "Common types"
|
||||
},
|
||||
"paths": {},
|
||||
"definitions": {
|
||||
"Resource": {
|
||||
"title": "Resource",
|
||||
"description": "Common fields that are returned in the response for all Azure Resource Manager resources",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"readOnly": true,
|
||||
"type": "string",
|
||||
"format": "arm-id",
|
||||
"description": "Fully qualified resource ID for the resource. E.g. \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}\""
|
||||
},
|
||||
"name": {
|
||||
"readOnly": true,
|
||||
"type": "string",
|
||||
"description": "The name of the resource"
|
||||
},
|
||||
"type": {
|
||||
"readOnly": true,
|
||||
"type": "string",
|
||||
"description": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\""
|
||||
},
|
||||
"systemData": {
|
||||
"readOnly": true,
|
||||
"description": "Azure Resource Manager metadata containing createdBy and modifiedBy information.",
|
||||
"$ref": "#/definitions/systemData"
|
||||
}
|
||||
},
|
||||
"x-ms-azure-resource": true
|
||||
},
|
||||
"AzureEntityResource": {
|
||||
"x-ms-client-name": "AzureEntityResource",
|
||||
"title": "Entity Resource",
|
||||
"description": "The resource model definition for an Azure Resource Manager resource with an etag.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"etag": {
|
||||
"type": "string",
|
||||
"readOnly": true,
|
||||
"description": "Resource Etag."
|
||||
}
|
||||
},
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/Resource"
|
||||
}
|
||||
]
|
||||
},
|
||||
"TrackedResource": {
|
||||
"title": "Tracked Resource",
|
||||
"description": "The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"tags": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
},
|
||||
"x-ms-mutability": [
|
||||
"read",
|
||||
"create",
|
||||
"update"
|
||||
],
|
||||
"description": "Resource tags."
|
||||
},
|
||||
"location": {
|
||||
"type": "string",
|
||||
"x-ms-mutability": [
|
||||
"read",
|
||||
"create"
|
||||
],
|
||||
"description": "The geo-location where the resource lives"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"location"
|
||||
],
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/Resource"
|
||||
}
|
||||
]
|
||||
},
|
||||
"ProxyResource": {
|
||||
"title": "Proxy Resource",
|
||||
"description": "The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location",
|
||||
"type": "object",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/Resource"
|
||||
}
|
||||
]
|
||||
},
|
||||
"ResourceModelWithAllowedPropertySet": {
|
||||
"description": "The resource model definition containing the full set of allowed properties for a resource. Except properties bag, there cannot be a top level property outside of this set.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"managedBy": {
|
||||
"type": "string",
|
||||
"x-ms-mutability": [
|
||||
"read",
|
||||
"create",
|
||||
"update"
|
||||
],
|
||||
"description": "The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another Azure resource. If this is present, complete mode deployment will not delete the resource if it is removed from the template since it is managed by another resource."
|
||||
},
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"x-ms-mutability": [
|
||||
"read",
|
||||
"create"
|
||||
],
|
||||
"description": "Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. E.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value.",
|
||||
"pattern": "^[-\\w\\._,\\(\\)]+$"
|
||||
},
|
||||
"etag": {
|
||||
"readOnly": true,
|
||||
"type": "string",
|
||||
"description": "The etag field is *not* required. If it is provided in the response body, it must also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. "
|
||||
},
|
||||
"identity": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/Identity"
|
||||
}
|
||||
]
|
||||
},
|
||||
"sku": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/Sku"
|
||||
}
|
||||
]
|
||||
},
|
||||
"plan": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/Plan"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TrackedResource"
|
||||
}
|
||||
],
|
||||
"x-ms-azure-resource": true
|
||||
},
|
||||
"SkuTier": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"Free",
|
||||
"Basic",
|
||||
"Standard",
|
||||
"Premium"
|
||||
],
|
||||
"x-ms-enum": {
|
||||
"name": "SkuTier",
|
||||
"modelAsString": false
|
||||
},
|
||||
"description": "This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT."
|
||||
},
|
||||
"Sku": {
|
||||
"description": "The resource model definition representing SKU",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "The name of the SKU. E.g. P3. It is typically a letter+number code"
|
||||
},
|
||||
"tier": {
|
||||
"$ref": "#/definitions/SkuTier"
|
||||
},
|
||||
"size": {
|
||||
"type": "string",
|
||||
"description": "The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. "
|
||||
},
|
||||
"family": {
|
||||
"type": "string",
|
||||
"description": "If the service has different generations of hardware, for the same SKU, then that can be captured here."
|
||||
},
|
||||
"capacity": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"description": "If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"name"
|
||||
]
|
||||
},
|
||||
"Identity": {
|
||||
"description": "Identity for the resource.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"principalId": {
|
||||
"readOnly": true,
|
||||
"type": "string",
|
||||
"format": "uuid",
|
||||
"description": "The principal ID of resource identity. The value must be an UUID."
|
||||
},
|
||||
"tenantId": {
|
||||
"readOnly": true,
|
||||
"type": "string",
|
||||
"format": "uuid",
|
||||
"description": "The tenant ID of resource. The value must be an UUID."
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"description": "The identity type.",
|
||||
"enum": [
|
||||
"SystemAssigned"
|
||||
],
|
||||
"x-ms-enum": {
|
||||
"name": "ResourceIdentityType",
|
||||
"modelAsString": false
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Plan": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "A user defined name of the 3rd Party Artifact that is being procured."
|
||||
},
|
||||
"publisher": {
|
||||
"type": "string",
|
||||
"description": "The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic"
|
||||
},
|
||||
"product": {
|
||||
"type": "string",
|
||||
"description": "The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at the time of Data Market onboarding. "
|
||||
},
|
||||
"promotionCode": {
|
||||
"type": "string",
|
||||
"description": "A publisher provided promotion code as provisioned in Data Market for the said product/artifact."
|
||||
},
|
||||
"version": {
|
||||
"type": "string",
|
||||
"description": "The version of the desired product/artifact."
|
||||
}
|
||||
},
|
||||
"description": "Plan for the resource.",
|
||||
"required": [
|
||||
"name",
|
||||
"publisher",
|
||||
"product"
|
||||
]
|
||||
},
|
||||
"ErrorDetail": {
|
||||
"description": "The error detail.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"readOnly": true,
|
||||
"type": "string",
|
||||
"description": "The error code."
|
||||
},
|
||||
"message": {
|
||||
"readOnly": true,
|
||||
"type": "string",
|
||||
"description": "The error message."
|
||||
},
|
||||
"target": {
|
||||
"readOnly": true,
|
||||
"type": "string",
|
||||
"description": "The error target."
|
||||
},
|
||||
"details": {
|
||||
"readOnly": true,
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/ErrorDetail"
|
||||
},
|
||||
"x-ms-identifiers": [
|
||||
"message",
|
||||
"target"
|
||||
],
|
||||
"description": "The error details."
|
||||
},
|
||||
"additionalInfo": {
|
||||
"readOnly": true,
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/ErrorAdditionalInfo"
|
||||
},
|
||||
"x-ms-identifiers": [],
|
||||
"description": "The error additional info."
|
||||
}
|
||||
}
|
||||
},
|
||||
"ErrorResponse": {
|
||||
"title": "Error response",
|
||||
"description": "Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"error": {
|
||||
"description": "The error object.",
|
||||
"$ref": "#/definitions/ErrorDetail"
|
||||
}
|
||||
}
|
||||
},
|
||||
"ErrorAdditionalInfo": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"readOnly": true,
|
||||
"type": "string",
|
||||
"description": "The additional info type."
|
||||
},
|
||||
"info": {
|
||||
"readOnly": true,
|
||||
"type": "object",
|
||||
"description": "The additional info."
|
||||
}
|
||||
},
|
||||
"description": "The resource management error additional info."
|
||||
},
|
||||
"Operation": {
|
||||
"title": "REST API Operation",
|
||||
"description": "Details of a REST API operation, returned from the Resource Provider Operations API",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"description": "The name of the operation, as per Resource-Based Access Control (RBAC). Examples: \"Microsoft.Compute/virtualMachines/write\", \"Microsoft.Compute/virtualMachines/capture/action\"",
|
||||
"type": "string",
|
||||
"readOnly": true
|
||||
},
|
||||
"isDataAction": {
|
||||
"description": "Whether the operation applies to data-plane. This is \"true\" for data-plane operations and \"false\" for ARM/control-plane operations.",
|
||||
"type": "boolean",
|
||||
"readOnly": true
|
||||
},
|
||||
"display": {
|
||||
"description": "Localized display information for this particular operation.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"provider": {
|
||||
"description": "The localized friendly form of the resource provider name, e.g. \"Microsoft Monitoring Insights\" or \"Microsoft Compute\".",
|
||||
"type": "string",
|
||||
"readOnly": true
|
||||
},
|
||||
"resource": {
|
||||
"description": "The localized friendly name of the resource type related to this operation. E.g. \"Virtual Machines\" or \"Job Schedule Collections\".",
|
||||
"type": "string",
|
||||
"readOnly": true
|
||||
},
|
||||
"operation": {
|
||||
"description": "The concise, localized friendly name for the operation; suitable for dropdowns. E.g. \"Create or Update Virtual Machine\", \"Restart Virtual Machine\".",
|
||||
"type": "string",
|
||||
"readOnly": true
|
||||
},
|
||||
"description": {
|
||||
"description": "The short, localized friendly description of the operation; suitable for tool tips and detailed views.",
|
||||
"type": "string",
|
||||
"readOnly": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"origin": {
|
||||
"description": "The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"",
|
||||
"type": "string",
|
||||
"readOnly": true,
|
||||
"enum": [
|
||||
"user",
|
||||
"system",
|
||||
"user,system"
|
||||
],
|
||||
"x-ms-enum": {
|
||||
"name": "Origin",
|
||||
"modelAsString": true
|
||||
}
|
||||
},
|
||||
"actionType": {
|
||||
"description": "Enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.",
|
||||
"type": "string",
|
||||
"readOnly": true,
|
||||
"enum": [
|
||||
"Internal"
|
||||
],
|
||||
"x-ms-enum": {
|
||||
"name": "ActionType",
|
||||
"modelAsString": true
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"OperationListResult": {
|
||||
"description": "A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"value": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/Operation"
|
||||
},
|
||||
"x-ms-identifiers": [
|
||||
"name"
|
||||
],
|
||||
"description": "List of operations supported by the resource provider",
|
||||
"readOnly": true
|
||||
},
|
||||
"nextLink": {
|
||||
"type": "string",
|
||||
"format": "uri",
|
||||
"description": "URL to get the next set of operation list results (if there are any).",
|
||||
"readOnly": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"OperationStatusResult": {
|
||||
"description": "The current status of an async operation.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"status"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "Fully qualified ID for the async operation.",
|
||||
"type": "string",
|
||||
"format": "arm-id"
|
||||
},
|
||||
"resourceId": {
|
||||
"description": "Fully qualified ID of the resource against which the original async operation was started.",
|
||||
"type": "string",
|
||||
"format": "arm-id",
|
||||
"readOnly": true
|
||||
},
|
||||
"name": {
|
||||
"description": "Name of the async operation.",
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"description": "Operation status.",
|
||||
"type": "string"
|
||||
},
|
||||
"percentComplete": {
|
||||
"description": "Percent of the operation that is complete.",
|
||||
"type": "number",
|
||||
"minimum": 0,
|
||||
"maximum": 100
|
||||
},
|
||||
"startTime": {
|
||||
"description": "The start time of the operation.",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"endTime": {
|
||||
"description": "The end time of the operation.",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"operations": {
|
||||
"description": "The operations list.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/OperationStatusResult"
|
||||
}
|
||||
},
|
||||
"error": {
|
||||
"description": "If present, details of the operation error.",
|
||||
"$ref": "#/definitions/ErrorDetail"
|
||||
}
|
||||
}
|
||||
},
|
||||
"locationData": {
|
||||
"description": "Metadata pertaining to the geographic location of the resource.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"maxLength": 256,
|
||||
"description": "A canonical name for the geographic or physical location."
|
||||
},
|
||||
"city": {
|
||||
"type": "string",
|
||||
"description": "The city or locality where the resource is located."
|
||||
},
|
||||
"district": {
|
||||
"type": "string",
|
||||
"description": "The district, state, or province where the resource is located."
|
||||
},
|
||||
"countryOrRegion": {
|
||||
"type": "string",
|
||||
"description": "The country or region where the resource is located"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"name"
|
||||
]
|
||||
},
|
||||
"systemData": {
|
||||
"description": "Metadata pertaining to creation and last modification of the resource.",
|
||||
"type": "object",
|
||||
"readOnly": true,
|
||||
"properties": {
|
||||
"createdBy": {
|
||||
"type": "string",
|
||||
"description": "The identity that created the resource."
|
||||
},
|
||||
"createdByType": {
|
||||
"type": "string",
|
||||
"description": "The type of identity that created the resource.",
|
||||
"enum": [
|
||||
"User",
|
||||
"Application",
|
||||
"ManagedIdentity",
|
||||
"Key"
|
||||
],
|
||||
"x-ms-enum": {
|
||||
"name": "createdByType",
|
||||
"modelAsString": true
|
||||
}
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"description": "The timestamp of resource creation (UTC)."
|
||||
},
|
||||
"lastModifiedBy": {
|
||||
"type": "string",
|
||||
"description": "The identity that last modified the resource."
|
||||
},
|
||||
"lastModifiedByType": {
|
||||
"type": "string",
|
||||
"description": "The type of identity that last modified the resource.",
|
||||
"enum": [
|
||||
"User",
|
||||
"Application",
|
||||
"ManagedIdentity",
|
||||
"Key"
|
||||
],
|
||||
"x-ms-enum": {
|
||||
"name": "createdByType",
|
||||
"modelAsString": true
|
||||
}
|
||||
},
|
||||
"lastModifiedAt": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"description": "The timestamp of resource last modification (UTC)"
|
||||
}
|
||||
}
|
||||
},
|
||||
"encryptionProperties": {
|
||||
"description": "Configuration of key for data encryption",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"status": {
|
||||
"description": "Indicates whether or not the encryption is enabled for container registry.",
|
||||
"enum": [
|
||||
"enabled",
|
||||
"disabled"
|
||||
],
|
||||
"type": "string",
|
||||
"x-ms-enum": {
|
||||
"name": "EncryptionStatus",
|
||||
"modelAsString": true
|
||||
}
|
||||
},
|
||||
"keyVaultProperties": {
|
||||
"$ref": "#/definitions/KeyVaultProperties",
|
||||
"description": "Key vault properties."
|
||||
}
|
||||
}
|
||||
},
|
||||
"KeyVaultProperties": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"keyIdentifier": {
|
||||
"description": "Key vault uri to access the encryption key.",
|
||||
"type": "string"
|
||||
},
|
||||
"identity": {
|
||||
"description": "The client ID of the identity which will be used to access key vault.",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"CheckNameAvailabilityRequest": {
|
||||
"description": "The check availability request body.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"description": "The name of the resource for which availability needs to be checked.",
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"description": "The resource type.",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"CheckNameAvailabilityResponse": {
|
||||
"description": "The check availability result.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"nameAvailable": {
|
||||
"description": "Indicates if the resource name is available.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"reason": {
|
||||
"description": "The reason why the given name is not available.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"Invalid",
|
||||
"AlreadyExists"
|
||||
],
|
||||
"x-ms-enum": {
|
||||
"name": "CheckNameAvailabilityReason",
|
||||
"modelAsString": true
|
||||
}
|
||||
},
|
||||
"message": {
|
||||
"description": "Detailed reason why the given name is available.",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": {
|
||||
"SubscriptionIdParameter": {
|
||||
"name": "subscriptionId",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"format": "uuid",
|
||||
"description": "The ID of the target subscription. The value must be an UUID."
|
||||
},
|
||||
"ApiVersionParameter": {
|
||||
"name": "api-version",
|
||||
"in": "query",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"description": "The API version to use for this operation.",
|
||||
"minLength": 1
|
||||
},
|
||||
"ResourceGroupNameParameter": {
|
||||
"name": "resourceGroupName",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"description": "The name of the resource group. The name is case insensitive.",
|
||||
"minLength": 1,
|
||||
"maxLength": 90,
|
||||
"x-ms-parameter-location": "method"
|
||||
},
|
||||
"ManagementGroupNameParameter": {
|
||||
"name": "managementGroupName",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"description": "The name of the management group. The name is case insensitive.",
|
||||
"minLength": 1,
|
||||
"maxLength": 90,
|
||||
"x-ms-parameter-location": "method"
|
||||
},
|
||||
"ScopeParameter": {
|
||||
"name": "scope",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"description": "The scope at which the operation is performed.",
|
||||
"minLength": 1,
|
||||
"x-ms-parameter-location": "method",
|
||||
"x-ms-skip-url-encoding": true
|
||||
},
|
||||
"TenantIdParameter": {
|
||||
"name": "tenantId",
|
||||
"in": "path",
|
||||
"description": "The Azure tenant ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"format": "uuid",
|
||||
"x-ms-parameter-location": "method"
|
||||
},
|
||||
"OperationIdParameter": {
|
||||
"name": "operationId",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"description": "The ID of an ongoing async operation.",
|
||||
"minLength": 1,
|
||||
"x-ms-parameter-location": "method"
|
||||
},
|
||||
"LocationParameter": {
|
||||
"name": "location",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"description": "The name of the Azure region.",
|
||||
"minLength": 1,
|
||||
"x-ms-parameter-location": "method"
|
||||
},
|
||||
"If-Match": {
|
||||
"name": "ifMatch",
|
||||
"in": "header",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"description": "The If-Match header that makes a request conditional.",
|
||||
"x-ms-parameter-location": "method"
|
||||
},
|
||||
"If-None-Match": {
|
||||
"name": "ifNoneMatch",
|
||||
"in": "header",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"description": "The If-None-Match header that makes a request conditional.",
|
||||
"x-ms-parameter-location": "method"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -78,6 +78,16 @@ async function main() {
|
|||
// Run the convert command on a mgmt spec
|
||||
await runCommand(baseDir, ["convert", "-o", baseSpecDir, "--swagger-readme", mgmtSpecLink]);
|
||||
|
||||
// Run the compare command to ensure it is working
|
||||
await runCommand(baseDir, [
|
||||
"compare",
|
||||
"--lhs",
|
||||
"/test/examples/specification/compare/lhs",
|
||||
"--rhs",
|
||||
"/test/examples/specification/compare/rhs",
|
||||
"--compile-tsp",
|
||||
]);
|
||||
|
||||
await unlink(join(repoRoot, "eng/emitter-package.json"));
|
||||
console.log("emitter-package.json ---------------> deleted successfully");
|
||||
await unlink(join(repoRoot, "eng/emitter-package-lock.json"));
|
||||
|
@ -85,30 +95,29 @@ async function main() {
|
|||
}
|
||||
|
||||
async function compareFiles(file1, file2) {
|
||||
try {
|
||||
const data1 = await readFile(file1, 'utf8');
|
||||
const data2 = await readFile(file2, 'utf8');
|
||||
return data1 === data2;
|
||||
} catch (err) {
|
||||
console.error('Error reading files:', err);
|
||||
throw err;
|
||||
}
|
||||
try {
|
||||
const data1 = await readFile(file1, "utf8");
|
||||
const data2 = await readFile(file2, "utf8");
|
||||
return data1 === data2;
|
||||
} catch (err) {
|
||||
console.error("Error reading files:", err);
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
|
||||
async function verifySwaggerSorting() {
|
||||
const baseDir = resolve(".");
|
||||
const specDir = resolve("./test/examples/specification/sort-swagger");
|
||||
const unsortedJson = join(specDir, "unsorted.json");
|
||||
const sortedJson = join(specDir, "sorted.json");
|
||||
const baseDir = resolve(".");
|
||||
const specDir = resolve("./test/examples/specification/sort-swagger");
|
||||
const unsortedJson = join(specDir, "unsorted.json");
|
||||
const sortedJson = join(specDir, "sorted.json");
|
||||
|
||||
await cp(unsortedJson, sortedJson);
|
||||
|
||||
await runCommand(baseDir, ["sort-swagger", sortedJson]);
|
||||
await cp(unsortedJson, sortedJson);
|
||||
|
||||
if (await compareFiles(sortedJson, join(specDir, "expected-sorted.json") ))
|
||||
console.log("sort-swagger verified successfully");
|
||||
else
|
||||
console.error("\x1b[31m", "sort-swagger ---------------> verification FAILED!", "\x1b[0m");
|
||||
await runCommand(baseDir, ["sort-swagger", sortedJson]);
|
||||
|
||||
if (await compareFiles(sortedJson, join(specDir, "expected-sorted.json")))
|
||||
console.log("sort-swagger verified successfully");
|
||||
else console.error("\x1b[31m", "sort-swagger ---------------> verification FAILED!", "\x1b[0m");
|
||||
}
|
||||
|
||||
main().catch((e) => {
|
||||
|
|
Загрузка…
Ссылка в новой задаче