diff --git a/.scripts/smoke-test.yml b/.scripts/smoke-test.yml index d1a3b2bd9f..b98ae23531 100644 --- a/.scripts/smoke-test.yml +++ b/.scripts/smoke-test.yml @@ -7,6 +7,7 @@ jobs: variables: - template: globals.yml steps: + - script: npm config set ignore-engines true - template: build.yml - script: npm run clone:specs workingDirectory: $(Build.SourcesDirectory)/packages/autorest.typescript diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 2de1cc6e1b..e9fa1f9862 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -127,7 +127,7 @@ packages: proper-lockfile: 2.0.1 dev: false - /@azure-tools/cadl-autorest/0.24.0_52e8edfeb097f3d300752ab5d2bc4110: + /@azure-tools/cadl-autorest/0.24.0_7bda408ad9292541f5168a7f363c83f7: resolution: {integrity: sha512-q8A3GRlwyQJ+/8cJs3dzyB4sRSVORItVS27NOraOwaXMudk9W6wW4uwBpyR07B3iHUanC8ZECe6CaCDUUttbtg==} engines: {node: '>=16.0.0'} peerDependencies: @@ -137,38 +137,38 @@ packages: '@cadl-lang/rest': ~0.38.0 '@cadl-lang/versioning': ~0.38.0 dependencies: - '@azure-tools/cadl-azure-core': 0.24.0_45b3e6f79972cdcc9be4cff2f875ce07 - '@cadl-lang/compiler': 0.38.5 - '@cadl-lang/openapi': 0.38.0_45b3e6f79972cdcc9be4cff2f875ce07 - '@cadl-lang/rest': 0.38.0_@cadl-lang+compiler@0.38.5 - '@cadl-lang/versioning': 0.38.0 + '@azure-tools/cadl-azure-core': 0.25.0_e8193149b17686a81a86c2eef847af07 + '@cadl-lang/compiler': 0.39.0 + '@cadl-lang/openapi': 0.39.0_e8193149b17686a81a86c2eef847af07 + '@cadl-lang/rest': 0.39.0_@cadl-lang+compiler@0.39.0 + '@cadl-lang/versioning': 0.39.0 dev: false - /@azure-tools/cadl-azure-core/0.24.0_45b3e6f79972cdcc9be4cff2f875ce07: - resolution: {integrity: sha512-Pzs1uC03Rbd783dAN8yvsFEWKJIBpV7zKf+Mj2S2x7F9IsR+KS1nlPmifIAtSCeSRPVkU21xD1WmzXvB1GR59w==} + /@azure-tools/cadl-azure-core/0.25.0_e8193149b17686a81a86c2eef847af07: + resolution: {integrity: sha512-V3yhJ9mUKntAt2AVm4f/sR91H/wWD8CMLUPQm2GwgSe/Fkv9fc4qE6qnE4QUxPGYJUgYeDXYv12qRN2eLId9sA==} engines: {node: '>=16.0.0'} peerDependencies: - '@cadl-lang/compiler': ~0.38.0 - '@cadl-lang/rest': ~0.38.0 + '@cadl-lang/compiler': ~0.39.0 + '@cadl-lang/rest': ~0.39.0 dependencies: - '@cadl-lang/compiler': 0.38.5 - '@cadl-lang/lint': 0.38.0_@cadl-lang+compiler@0.38.5 - '@cadl-lang/rest': 0.38.0_@cadl-lang+compiler@0.38.5 + '@cadl-lang/compiler': 0.39.0 + '@cadl-lang/lint': 0.39.0_@cadl-lang+compiler@0.39.0 + '@cadl-lang/rest': 0.39.0_@cadl-lang+compiler@0.39.0 dev: false - /@azure-tools/cadl-dpg/0.24.0_45b3e6f79972cdcc9be4cff2f875ce07: - resolution: {integrity: sha512-9tjkQywJKAHyTwWH5lxvd4w4De1DpEW10uTm4WM12glwef3ZIDE/fUl/yizYA8+kYle5YLTsAVXo0pKYCQWnOg==} + /@azure-tools/cadl-dpg/0.25.0_e8193149b17686a81a86c2eef847af07: + resolution: {integrity: sha512-T4txhl86WH4se3gklRBNBmy81w7C1fY/fkuRLQGgycBqZ1BEOkn7UpExh90alrGs7eNT8YzWcgh9lO1HWn1BQA==} engines: {node: '>=16.0.0'} peerDependencies: - '@cadl-lang/compiler': ~0.38.0 - '@cadl-lang/rest': ~0.38.0 + '@cadl-lang/compiler': ~0.39.0 + '@cadl-lang/rest': ~0.39.0 dependencies: - '@cadl-lang/compiler': 0.38.5 - '@cadl-lang/rest': 0.38.0_@cadl-lang+compiler@0.38.5 + '@cadl-lang/compiler': 0.39.0 + '@cadl-lang/rest': 0.39.0_@cadl-lang+compiler@0.39.0 dev: false - /@azure-tools/cadl-ranch-api/0.1.10: - resolution: {integrity: sha512-elg/nBbkWDW8USe9O39dsg8tpeBuZHjKt5jBT3cf3Qn47OzXFky/SWx7p6/baJdZAZBxHoW0fSqFZIuyKx185Q==} + /@azure-tools/cadl-ranch-api/0.1.11: + resolution: {integrity: sha512-aHHEhI77jhB9fzIaa89bPisMcKJsrFV4JDRs09m2cecv0NBMH7mq+lU75OPg19uscX4aA3xHZxGcM5JdWF4TJw==} engines: {node: '>=16.0.0'} dependencies: body-parser: 1.20.1 @@ -184,8 +184,8 @@ packages: - '@types/express' dev: false - /@azure-tools/cadl-ranch-coverage-sdk/0.1.3: - resolution: {integrity: sha512-SWalQY0bkyZU1P7DlhDb4YeU3jkEGlJRCpocuVYtTBe/d37uegHgnXKQ8zwZZW/0NoLBsaKV2sK4Jbsbk2BhFg==} + /@azure-tools/cadl-ranch-coverage-sdk/0.1.4: + resolution: {integrity: sha512-m66CD/VqnMqx0CEj2zKBIrqSSBiiZxhiQ2ohgCIxGZpcxmW/rF31KBLg4nLfHez/AK1xxVLzEAZoWHLFe7iWHQ==} engines: {node: '>=16.0.0'} dependencies: '@azure/identity': 3.1.2 @@ -196,51 +196,51 @@ packages: - supports-color dev: false - /@azure-tools/cadl-ranch-expect/0.1.13_45b3e6f79972cdcc9be4cff2f875ce07: - resolution: {integrity: sha512-ucv9eDQZ31X9lsuI/C3prd87aL3WxH7rB/6JHYQq90hvTcVI26VMjgkZaXcWOuYgcsV41CiNbe+H5EQcg//C6A==} + /@azure-tools/cadl-ranch-expect/0.1.15_e8193149b17686a81a86c2eef847af07: + resolution: {integrity: sha512-QS9kOUtwmhkkXJ8N+drmC09t2u9xXZS8vr8NFMbNDLb9l6z6n2XXA3FgCuuREUN0J6lKi3J0Qgu3OpaBoq4/GQ==} engines: {node: '>=16.0.0'} peerDependencies: - '@cadl-lang/compiler': ~0.38.0 - '@cadl-lang/rest': ~0.38.0 + '@cadl-lang/compiler': ~0.39.0 + '@cadl-lang/rest': ~0.39.0 dependencies: - '@cadl-lang/compiler': 0.38.5 - '@cadl-lang/rest': 0.38.0_@cadl-lang+compiler@0.38.5 + '@cadl-lang/compiler': 0.39.0 + '@cadl-lang/rest': 0.39.0_@cadl-lang+compiler@0.39.0 dev: false - /@azure-tools/cadl-ranch-specs/0.6.3_31bdc46b262702ee3be268e2f58e1e00: - resolution: {integrity: sha512-qqGLBwHuqMTRIbCHp2gNI2m6C2SDrXqrEaeO560Skd9m9kttR2mlQZJmMUNIjbYiCi/eHZ2TIY3KI0GBpSzHuw==} + /@azure-tools/cadl-ranch-specs/0.6.6_ce85239a4a083fe0d907a5758a031cfd: + resolution: {integrity: sha512-cqP5JvisH8IgGQ+/Qprwj4h0AY+SX7kPPY0ynhHB5h8RrGdg+oFD9n9xgVw+Ka/9k8Jgf/hhZLRltzUPtZkoBQ==} engines: {node: '>=16.0.0'} peerDependencies: - '@azure-tools/cadl-azure-core': ~0.24.0 - '@azure-tools/cadl-ranch-expect': ~0.1.13 - '@cadl-lang/compiler': ~0.38.0 - '@cadl-lang/rest': ~0.38.0 - '@cadl-lang/versioning': ~0.38.0 - dependencies: - '@azure-tools/cadl-azure-core': 0.24.0_45b3e6f79972cdcc9be4cff2f875ce07 - '@azure-tools/cadl-ranch': 0.2.12 - '@azure-tools/cadl-ranch-api': 0.1.10 - '@azure-tools/cadl-ranch-expect': 0.1.13_45b3e6f79972cdcc9be4cff2f875ce07 - '@cadl-lang/compiler': 0.38.5 - '@cadl-lang/rest': 0.38.0_@cadl-lang+compiler@0.38.5 - '@cadl-lang/versioning': 0.38.0 + '@azure-tools/cadl-azure-core': ~0.25.0 + '@azure-tools/cadl-ranch-expect': ~0.1.15 + '@cadl-lang/compiler': ~0.39.0 + '@cadl-lang/rest': ~0.39.0 + '@cadl-lang/versioning': ~0.39.0 + dependencies: + '@azure-tools/cadl-azure-core': 0.25.0_e8193149b17686a81a86c2eef847af07 + '@azure-tools/cadl-ranch': 0.2.15 + '@azure-tools/cadl-ranch-api': 0.1.11 + '@azure-tools/cadl-ranch-expect': 0.1.15_e8193149b17686a81a86c2eef847af07 + '@cadl-lang/compiler': 0.39.0 + '@cadl-lang/rest': 0.39.0_@cadl-lang+compiler@0.39.0 + '@cadl-lang/versioning': 0.39.0 transitivePeerDependencies: - '@types/express' - encoding - supports-color dev: false - /@azure-tools/cadl-ranch/0.2.12: - resolution: {integrity: sha512-cf8c+Wf6mUL0Exgf5v+Fx2q5+wUp/RVSLmEmXfyQcaD8Wn9nXFslEmdCU5Fo+OktiOiIA9VKCI+iCCaFRIa9gw==} + /@azure-tools/cadl-ranch/0.2.15: + resolution: {integrity: sha512-o2i2I4bsAxQY4mDpgvgDTdxi8dQehpzFYiXIMLPtDeONJcsSsOdYsy1Z2c9XdY8QTQk+w3NWMvDyRP/HW1Shwg==} engines: {node: '>=16.0.0'} hasBin: true dependencies: - '@azure-tools/cadl-ranch-api': 0.1.10 - '@azure-tools/cadl-ranch-coverage-sdk': 0.1.3 - '@azure-tools/cadl-ranch-expect': 0.1.13_45b3e6f79972cdcc9be4cff2f875ce07 + '@azure-tools/cadl-ranch-api': 0.1.11 + '@azure-tools/cadl-ranch-coverage-sdk': 0.1.4 + '@azure-tools/cadl-ranch-expect': 0.1.15_e8193149b17686a81a86c2eef847af07 '@azure/identity': 3.1.2 - '@cadl-lang/compiler': 0.38.5 - '@cadl-lang/rest': 0.38.0_@cadl-lang+compiler@0.38.5 + '@cadl-lang/compiler': 0.39.0 + '@cadl-lang/rest': 0.39.0_@cadl-lang+compiler@0.39.0 '@types/js-yaml': 4.0.5 ajv: 8.11.0 body-parser: 1.20.1 @@ -252,7 +252,7 @@ packages: morgan: 1.10.0 node-fetch: 3.3.0 picocolors: 1.0.0 - prettier: 2.7.1 + prettier: 2.8.3 source-map-support: 0.5.21 winston: 3.8.2 xml2js: 0.4.23 @@ -1775,8 +1775,8 @@ packages: to-fast-properties: 2.0.0 dev: false - /@cadl-lang/compiler/0.38.5: - resolution: {integrity: sha512-jd6a8TEp9ApBzekTb39aBPocYrkuqzsQbLTDcc/c6tA47Wmr87463MAXpeB80ziEsr15sccI01j3g63jt5W0Aw==} + /@cadl-lang/compiler/0.39.0: + resolution: {integrity: sha512-eAEE66PrwmT4QlWjJm8H/YIljI9n7cNDnSIBN1mbfXFLORKauLhkmYfyVvFzCv/SWNJiw+7VwHje23ITJ/tFDA==} engines: {node: '>=16.0.0'} hasBin: true dependencies: @@ -1790,34 +1790,34 @@ packages: node-fetch: 3.2.8 node-watch: 0.7.3 picocolors: 1.0.0 - prettier: 2.7.1 + prettier: 2.8.3 prompts: 2.4.2 vscode-languageserver: 8.0.2 vscode-languageserver-textdocument: 1.0.8 yargs: 17.6.2 dev: false - /@cadl-lang/lint/0.38.0_@cadl-lang+compiler@0.38.5: - resolution: {integrity: sha512-6g4yoXeaNnTYxEWA0QywN3HkTCINPTHI56IsDKp6JhLOiROj1NvoufUzX438vdTqDqNyHg2t08fRmLMJP4GsCQ==} + /@cadl-lang/lint/0.39.0_@cadl-lang+compiler@0.39.0: + resolution: {integrity: sha512-qaWnOYH68ppEDI4jWhPMk6gUIs7t/VYREAjvjniwjc5IYhHPFz5hzFUjmZOAp1az9bxJVwBVtGp1pSB8LFgXCQ==} engines: {node: '>=16.0.0'} peerDependencies: - '@cadl-lang/compiler': ~0.38.0 + '@cadl-lang/compiler': ~0.39.0 dependencies: - '@cadl-lang/compiler': 0.38.5 + '@cadl-lang/compiler': 0.39.0 dev: false - /@cadl-lang/openapi/0.38.0_45b3e6f79972cdcc9be4cff2f875ce07: - resolution: {integrity: sha512-lFmU5AsZtw7Ofcnq3lg18Ieg21iuS73NOb+549BxPZX2j70vEqqfRT3CCCFmpGCK2sAUy2x2qD+pVUBcQIXeHQ==} + /@cadl-lang/openapi/0.39.0_e8193149b17686a81a86c2eef847af07: + resolution: {integrity: sha512-N/NlryVdaFKzzSdbLeko09M5s2aNEnZsMXHYCMCb9b0HLeJJ/cR/nCulTxCoNO1VMN5VWdSaohBtle4EHS/HSw==} engines: {node: '>=16.0.0'} peerDependencies: - '@cadl-lang/compiler': ~0.38.0 - '@cadl-lang/rest': ~0.38.0 + '@cadl-lang/compiler': ~0.39.0 + '@cadl-lang/rest': ~0.39.0 dependencies: - '@cadl-lang/compiler': 0.38.5 - '@cadl-lang/rest': 0.38.0_@cadl-lang+compiler@0.38.5 + '@cadl-lang/compiler': 0.39.0 + '@cadl-lang/rest': 0.39.0_@cadl-lang+compiler@0.39.0 dev: false - /@cadl-lang/openapi3/0.38.0_96bdfb989d314920f97302bff8d49711: + /@cadl-lang/openapi3/0.38.0_7f037d8c3166e9947eadca7a84842376: resolution: {integrity: sha512-l7000SmmTTqQsnoNunbpKHNemfcUyPt6EBLW9F0vpzVHK4YTC40biVu/6EIYF4KeKq2mTtbC4akRH3kLrpQoKQ==} engines: {node: '>=16.0.0'} peerDependencies: @@ -1826,10 +1826,10 @@ packages: '@cadl-lang/rest': ~0.38.0 '@cadl-lang/versioning': ~0.38.0 dependencies: - '@cadl-lang/compiler': 0.38.5 - '@cadl-lang/openapi': 0.38.0_45b3e6f79972cdcc9be4cff2f875ce07 - '@cadl-lang/rest': 0.38.0_@cadl-lang+compiler@0.38.5 - '@cadl-lang/versioning': 0.38.0 + '@cadl-lang/compiler': 0.39.0 + '@cadl-lang/openapi': 0.39.0_e8193149b17686a81a86c2eef847af07 + '@cadl-lang/rest': 0.39.0_@cadl-lang+compiler@0.39.0 + '@cadl-lang/versioning': 0.39.0 dev: false /@cadl-lang/prettier-plugin-cadl/0.38.0: @@ -1838,20 +1838,20 @@ packages: prettier: 2.7.1 dev: false - /@cadl-lang/rest/0.38.0_@cadl-lang+compiler@0.38.5: - resolution: {integrity: sha512-DvLLoUaG3//nf4HC4BhFFNK8cotYbwtL35cb6Nko8MYruLCuxQn0vZKtAMLnlvZWXc65qfbnTz1W/EI0NQh8+w==} + /@cadl-lang/rest/0.39.0_@cadl-lang+compiler@0.39.0: + resolution: {integrity: sha512-KpEpC/kEoeEFT4DpuG6G4kK2kzuQ4sH85P99ched8CLAo2SzWT0WVYEjya1ony+hqKlvm2nrigattX7P1ES8TQ==} engines: {node: '>=16.0.0'} peerDependencies: - '@cadl-lang/compiler': ~0.38.0 + '@cadl-lang/compiler': ~0.39.0 dependencies: - '@cadl-lang/compiler': 0.38.5 + '@cadl-lang/compiler': 0.39.0 dev: false - /@cadl-lang/versioning/0.38.0: - resolution: {integrity: sha512-7ECvYQShLu80eyQzRgRH1Lu/P1lrjnHpnEcNZK8bVoHoy+QT+DkY/c22OoBRwcb5kux9/T1/CMF61WqfrKC8jQ==} + /@cadl-lang/versioning/0.39.0: + resolution: {integrity: sha512-mMmqHTo/Cwssb5Y1qC5Fb4rPkyt7JPK+bWT8KH/oprdG3MOJSemyeEIxQtkId3oBdHZiQHG7T9IN80Dks3GE/A==} engines: {node: '>=16.0.0'} dependencies: - '@cadl-lang/compiler': 0.38.5 + '@cadl-lang/compiler': 0.39.0 dev: false /@colors/colors/1.5.0: @@ -2921,7 +2921,7 @@ packages: dev: false /array-flatten/1.1.1: - resolution: {integrity: sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=} + resolution: {integrity: sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==} dev: false /array-includes/3.1.6: @@ -3284,7 +3284,7 @@ packages: dev: false /buffer-equal-constant-time/1.0.1: - resolution: {integrity: sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=} + resolution: {integrity: sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==} dev: false /buffer-from/1.1.2: @@ -3436,7 +3436,7 @@ packages: dev: false /charenc/0.0.2: - resolution: {integrity: sha1-wKHS86cJLgN3S/qD8UwPxXkKhmc=} + resolution: {integrity: sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==} dev: false /charset/1.0.1: @@ -3682,7 +3682,7 @@ packages: dev: false /concat-map/0.0.1: - resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=} + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} dev: false /config-chain/1.1.13: @@ -3743,7 +3743,7 @@ packages: dev: false /cookie-signature/1.0.6: - resolution: {integrity: sha1-4wOogrNCzD7oylE6eZmXNNqzriw=} + resolution: {integrity: sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==} dev: false /cookie/0.4.2: @@ -3839,7 +3839,7 @@ packages: dev: false /crypt/0.0.2: - resolution: {integrity: sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs=} + resolution: {integrity: sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==} dev: false /crypto-browserify/3.12.0: @@ -4193,7 +4193,7 @@ packages: dev: false /ee-first/1.1.1: - resolution: {integrity: sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=} + resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} dev: false /electron-to-chromium/1.4.284: @@ -5025,7 +5025,7 @@ packages: dev: false /fresh/0.5.2: - resolution: {integrity: sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=} + resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==} engines: {node: '>= 0.6'} dev: false @@ -6689,7 +6689,7 @@ packages: dev: false /media-typer/0.3.0: - resolution: {integrity: sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=} + resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==} engines: {node: '>= 0.6'} dev: false @@ -6699,7 +6699,7 @@ packages: dev: false /merge-descriptors/1.0.1: - resolution: {integrity: sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=} + resolution: {integrity: sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==} dev: false /merge-stream/2.0.0: @@ -7738,6 +7738,12 @@ packages: hasBin: true dev: false + /prettier/2.8.3: + resolution: {integrity: sha512-tJ/oJ4amDihPoufT5sM0Z1SKEuKay8LfVAMlbbhnnkvt6BUserZylqo2PN+p9KeljLr0OHa2rXHU1T8reeoTrw==} + engines: {node: '>=10.13.0'} + hasBin: true + dev: false + /pretty-ms/7.0.1: resolution: {integrity: sha512-973driJZvxiGOQ5ONsFhOF/DtzPMOMtgC11kCpUrPGMTgqp2q/1gwzCquocrN33is0VZ5GFHXZYMM9l6h67v2Q==} engines: {node: '>=10'} @@ -9229,7 +9235,7 @@ packages: dev: false /utils-merge/1.0.1: - resolution: {integrity: sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=} + resolution: {integrity: sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==} engines: {node: '>= 0.4.0'} dev: false @@ -9273,7 +9279,7 @@ packages: dev: false /verror/1.10.0: - resolution: {integrity: sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=} + resolution: {integrity: sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==} engines: {'0': node >=0.6.0} dependencies: assert-plus: 1.0.0 @@ -9895,19 +9901,19 @@ packages: dev: false file:projects/cadl-rest-test.tgz: - resolution: {integrity: sha512-aZaR/Da8BXbLjTPlO4NB9xMuIN7pGKk590qt9ikG2dTCeYbwvaGvpA9OLJ5GqFLM96vI7ZtDx8H/8gRYpjGe5w==, tarball: file:projects/cadl-rest-test.tgz} + resolution: {integrity: sha512-u5813OzqR8ijCLc/U+NJ03ih23KG4Cw5ILTqz72xf3j4Ss3+J2EVMXQW8IRIaAFsheMphOeEhQywwZMoQBGxfA==, tarball: file:projects/cadl-rest-test.tgz} name: '@rush-temp/cadl-rest-test' version: 0.0.0 dependencies: - '@azure-tools/cadl-autorest': 0.24.0_52e8edfeb097f3d300752ab5d2bc4110 - '@azure-tools/cadl-azure-core': 0.24.0_45b3e6f79972cdcc9be4cff2f875ce07 - '@azure-tools/cadl-dpg': 0.24.0_45b3e6f79972cdcc9be4cff2f875ce07 - '@cadl-lang/compiler': 0.38.5 - '@cadl-lang/openapi': 0.38.0_45b3e6f79972cdcc9be4cff2f875ce07 - '@cadl-lang/openapi3': 0.38.0_96bdfb989d314920f97302bff8d49711 + '@azure-tools/cadl-autorest': 0.24.0_7bda408ad9292541f5168a7f363c83f7 + '@azure-tools/cadl-azure-core': 0.25.0_e8193149b17686a81a86c2eef847af07 + '@azure-tools/cadl-dpg': 0.25.0_e8193149b17686a81a86c2eef847af07 + '@cadl-lang/compiler': 0.39.0 + '@cadl-lang/openapi': 0.39.0_e8193149b17686a81a86c2eef847af07 + '@cadl-lang/openapi3': 0.38.0_7f037d8c3166e9947eadca7a84842376 '@cadl-lang/prettier-plugin-cadl': 0.38.0 - '@cadl-lang/rest': 0.38.0_@cadl-lang+compiler@0.38.5 - '@cadl-lang/versioning': 0.38.0 + '@cadl-lang/rest': 0.39.0_@cadl-lang+compiler@0.39.0 + '@cadl-lang/versioning': 0.39.0 '@types/mocha': 5.2.7 '@types/node': 18.11.18 prettier: 2.7.1 @@ -9916,23 +9922,23 @@ packages: dev: false file:projects/cadl-typescript.tgz: - resolution: {integrity: sha512-zYy6iPdg0zARnILCQN90fNdtp8f0mEunc10yeI5GIX8E5lZ3ySWPL1LYJDqJuRMr0Af/a6M2DuzHLSzPItspzQ==, tarball: file:projects/cadl-typescript.tgz} + resolution: {integrity: sha512-Q/s5XJjY5olveKjCYBJDXr9LBG0OlnTWY5sEUluRdBlzabKHWOkrnffGgZhLqvfL+A6KmVyIdvmYOnQXP1NM2Q==, tarball: file:projects/cadl-typescript.tgz} name: '@rush-temp/cadl-typescript' version: 0.0.0 dependencies: '@azure-rest/core-client': 1.0.1 - '@azure-tools/cadl-azure-core': 0.24.0_45b3e6f79972cdcc9be4cff2f875ce07 - '@azure-tools/cadl-dpg': 0.24.0_45b3e6f79972cdcc9be4cff2f875ce07 - '@azure-tools/cadl-ranch': 0.2.12 - '@azure-tools/cadl-ranch-expect': 0.1.13_45b3e6f79972cdcc9be4cff2f875ce07 - '@azure-tools/cadl-ranch-specs': 0.6.3_31bdc46b262702ee3be268e2f58e1e00 + '@azure-tools/cadl-azure-core': 0.25.0_e8193149b17686a81a86c2eef847af07 + '@azure-tools/cadl-dpg': 0.25.0_e8193149b17686a81a86c2eef847af07 + '@azure-tools/cadl-ranch': 0.2.15 + '@azure-tools/cadl-ranch-expect': 0.1.15_e8193149b17686a81a86c2eef847af07 + '@azure-tools/cadl-ranch-specs': 0.6.6_ce85239a4a083fe0d907a5758a031cfd '@azure/core-auth': 1.4.0 '@azure/core-lro': 2.5.0 '@azure/core-paging': 1.4.0 '@azure/core-rest-pipeline': 1.10.1 - '@cadl-lang/compiler': 0.38.5 - '@cadl-lang/rest': 0.38.0_@cadl-lang+compiler@0.38.5 - '@cadl-lang/versioning': 0.38.0 + '@cadl-lang/compiler': 0.39.0 + '@cadl-lang/rest': 0.39.0_@cadl-lang+compiler@0.39.0 + '@cadl-lang/versioning': 0.39.0 '@types/chai': 4.3.4 '@types/fs-extra': 9.0.13 '@types/mocha': 9.1.1 diff --git a/packages/cadl-rlc-test/package.json b/packages/cadl-rlc-test/package.json index 0f6d7e7628..d3ce47dbdd 100644 --- a/packages/cadl-rlc-test/package.json +++ b/packages/cadl-rlc-test/package.json @@ -3,16 +3,16 @@ "version": "1.0.0", "type": "module", "dependencies": { - "@cadl-lang/compiler": "~0.38.5", + "@cadl-lang/compiler": "~0.39.0", "@azure-tools/cadl-typescript": "1.0.0-beta.8", - "@cadl-lang/rest": "0.38.0", - "@cadl-lang/openapi": "0.38.0", - "@cadl-lang/versioning": "0.38.0", - "@azure-tools/cadl-azure-core": "0.24.0", - "@azure-tools/cadl-autorest": "0.24.0", - "@azure-tools/cadl-dpg": "0.24.0", - "@cadl-lang/openapi3": "0.38.0", - "@cadl-lang/prettier-plugin-cadl": "0.38.0", + "@cadl-lang/rest": "~0.39.0", + "@cadl-lang/openapi": "~0.39.0", + "@cadl-lang/versioning": "~0.39.0", + "@azure-tools/cadl-azure-core": "~0.25.0", + "@azure-tools/cadl-autorest": "~0.24.0", + "@azure-tools/cadl-dpg": "~0.25.0", + "@cadl-lang/openapi3": "~0.38.0", + "@cadl-lang/prettier-plugin-cadl": "~0.38.0", "prettier": "2.7.1" }, "devDependencies": { diff --git a/packages/cadl-rlc-test/test/anomalyDetector/cadl-output/review/ai-anomaly-detector.api.md b/packages/cadl-rlc-test/test/anomalyDetector/cadl-output/review/ai-anomaly-detector.api.md index 7cc25fddb8..e455a6e4bb 100644 --- a/packages/cadl-rlc-test/test/anomalyDetector/cadl-output/review/ai-anomaly-detector.api.md +++ b/packages/cadl-rlc-test/test/anomalyDetector/cadl-output/review/ai-anomaly-detector.api.md @@ -32,7 +32,7 @@ export interface AlignPolicyOutput { export interface AnomalyDetectionModelOutput { createdTime: string; lastUpdatedTime: string; - modelId: string; + readonly modelId: string; modelInfo?: ModelInfoOutput; } @@ -537,7 +537,7 @@ export interface MultivariateBatchDetectionResultSummaryOutput { // @public export interface MultivariateDetectionResultOutput { - resultId: string; + readonly resultId: string; results: Array; summary: MultivariateBatchDetectionResultSummaryOutput; } diff --git a/packages/cadl-rlc-test/test/anomalyDetector/cadl-output/src/outputModels.ts b/packages/cadl-rlc-test/test/anomalyDetector/cadl-output/src/outputModels.ts index 2b12f7cf41..ed764cbce8 100644 --- a/packages/cadl-rlc-test/test/anomalyDetector/cadl-output/src/outputModels.ts +++ b/packages/cadl-rlc-test/test/anomalyDetector/cadl-output/src/outputModels.ts @@ -136,7 +136,7 @@ export interface UnivariateChangePointDetectionResultOutput { /** Detection results for the given resultId. */ export interface MultivariateDetectionResultOutput { /** Result identifier, which is used to fetch the results of an inference call. */ - resultId: string; + readonly resultId: string; /** Multivariate anomaly detection status. */ summary: MultivariateBatchDetectionResultSummaryOutput; /** Detection result for each timestamp. */ @@ -355,7 +355,7 @@ export interface ModelStateOutput { /** Response of getting a model. */ export interface AnomalyDetectionModelOutput { /** Model identifier. */ - modelId: string; + readonly modelId: string; /** Date and time (UTC) when the model was created. */ createdTime: string; /** Date and time (UTC) when the model was last updated. */ diff --git a/packages/cadl-rlc-test/test/anomalyDetector/cadl-output/v1.1/openapi.json b/packages/cadl-rlc-test/test/anomalyDetector/cadl-output/v1.1/openapi.json index 19405108cc..e62fdd91d7 100644 --- a/packages/cadl-rlc-test/test/anomalyDetector/cadl-output/v1.1/openapi.json +++ b/packages/cadl-rlc-test/test/anomalyDetector/cadl-output/v1.1/openapi.json @@ -528,7 +528,8 @@ "modelId": { "type": "string", "description": "Model identifier.", - "format": "uuid" + "format": "uuid", + "readOnly": true }, "createdTime": { "type": "string", @@ -998,7 +999,8 @@ "resultId": { "type": "string", "description": "Result identifier, which is used to fetch the results of an inference call.", - "format": "uuid" + "format": "uuid", + "readOnly": true }, "summary": { "$ref": "#/definitions/Multivariate.MultivariateBatchDetectionResultSummary", diff --git a/packages/cadl-rlc-test/test/anomalyDetector/spec/multivariate/models.cadl b/packages/cadl-rlc-test/test/anomalyDetector/spec/multivariate/models.cadl index 64e238a2ce..c1136cece3 100644 --- a/packages/cadl-rlc-test/test/anomalyDetector/spec/multivariate/models.cadl +++ b/packages/cadl-rlc-test/test/anomalyDetector/spec/multivariate/models.cadl @@ -52,6 +52,7 @@ model MultivariateDetectionResult { @doc("Result identifier, which is used to fetch the results of an inference call.") @key @format("uuid") + @visibility("read") resultId: string; @doc("Multivariate anomaly detection status.") @@ -310,6 +311,7 @@ model AnomalyDetectionModel { @doc("Model identifier.") @key @format("uuid") + @visibility("read") modelId: string; @doc("Date and time (UTC) when the model was created.") diff --git a/packages/cadl-rlc-test/test/authoring/cadl-output/openapi.json b/packages/cadl-rlc-test/test/authoring/cadl-output/openapi.json index d8d4c57964..632139bf36 100644 --- a/packages/cadl-rlc-test/test/authoring/cadl-output/openapi.json +++ b/packages/cadl-rlc-test/test/authoring/cadl-output/openapi.json @@ -50,15 +50,6 @@ "operationId": "Projects_ListProjects", "description": "Lists the existing projects.", "parameters": [ - { - "$ref": "#/parameters/Azure.Core.TopQueryParameter" - }, - { - "$ref": "#/parameters/Azure.Core.SkipQueryParameter" - }, - { - "$ref": "#/parameters/Azure.Core.MaxPageSizeQueryParameter" - }, { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" } @@ -89,7 +80,7 @@ "required": [ "value" ], - "x-cadl-name": "Azure.Core.Foundations.CustomPage" + "x-cadl-name": "Azure.Core.Foundations.CustomPage" } }, "default": { @@ -109,6 +100,9 @@ "operationId": "Projects_CreateOrUpdate", "description": "Creates a new project or updates an existing one.", "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, { "name": "projectName", "in": "path", @@ -117,41 +111,12 @@ "type": "string" }, { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "body", + "name": "resource", "in": "body", + "required": true, + "description": "The resource instance.", "schema": { - "type": "object", - "properties": { - "projectKind": { - "$ref": "#/definitions/ProjectKind", - "description": "The project kind." - }, - "storageInputContainerName": { - "type": "string", - "description": "The storage container name." - }, - "settings": { - "$ref": "#/definitions/ProjectSettings", - "description": "The project settings." - }, - "multilingual": { - "type": "boolean", - "description": "Whether the project would be used for multiple languages or not." - }, - "description": { - "type": "string", - "description": "The project description." - }, - "language": { - "type": "string", - "description": "The project language. This is BCP-47 representation of a language. For example, use \"en\" for English, \"en-gb\" for English (UK), \"es\" for Spanish etc." - } - }, - "description": "The template for adding optional properties.", - "x-cadl-name": "Azure.Core.Foundations.ResourceCreateOrUpdateModel" + "$ref": "#/definitions/ProjectUpdate" } } ], @@ -166,73 +131,7 @@ } }, "schema": { - "type": "object", - "properties": { - "projectName": { - "type": "string", - "description": "The project name.", - "readOnly": true - }, - "projectKind": { - "$ref": "#/definitions/ProjectKind", - "description": "The project kind." - }, - "storageInputContainerName": { - "type": "string", - "description": "The storage container name." - }, - "settings": { - "$ref": "#/definitions/ProjectSettings", - "description": "The project settings." - }, - "multilingual": { - "type": "boolean", - "description": "Whether the project would be used for multiple languages or not." - }, - "description": { - "type": "string", - "description": "The project description." - }, - "language": { - "type": "string", - "description": "The project language. This is BCP-47 representation of a language. For example, use \"en\" for English, \"en-gb\" for English (UK), \"es\" for Spanish etc." - }, - "createdDateTime": { - "type": "string", - "format": "date-time", - "description": "Represents the project creation datetime.", - "readOnly": true - }, - "lastModifiedDateTime": { - "type": "string", - "format": "date-time", - "description": "Represents the project last modification datetime.", - "readOnly": true - }, - "lastTrainedDateTime": { - "type": "string", - "format": "date-time", - "description": "Represents the project last training datetime.", - "readOnly": true - }, - "lastDeployedDateTime": { - "type": "string", - "format": "date-time", - "description": "Represents the project last deployment datetime.", - "readOnly": true - } - }, - "required": [ - "projectName", - "projectKind", - "storageInputContainerName", - "language", - "createdDateTime", - "lastModifiedDateTime", - "lastTrainedDateTime", - "lastDeployedDateTime" - ], - "x-cadl-name": "Azure.Core.Foundations.ResourceOkResponse" + "$ref": "#/definitions/Project" } }, "201": { @@ -245,74 +144,7 @@ } }, "schema": { - "type": "object", - "properties": { - "projectName": { - "type": "string", - "description": "The project name.", - "readOnly": true - }, - "projectKind": { - "$ref": "#/definitions/ProjectKind", - "description": "The project kind." - }, - "storageInputContainerName": { - "type": "string", - "description": "The storage container name." - }, - "settings": { - "$ref": "#/definitions/ProjectSettings", - "description": "The project settings." - }, - "multilingual": { - "type": "boolean", - "description": "Whether the project would be used for multiple languages or not." - }, - "description": { - "type": "string", - "description": "The project description." - }, - "language": { - "type": "string", - "description": "The project language. This is BCP-47 representation of a language. For example, use \"en\" for English, \"en-gb\" for English (UK), \"es\" for Spanish etc." - }, - "createdDateTime": { - "type": "string", - "format": "date-time", - "description": "Represents the project creation datetime.", - "readOnly": true - }, - "lastModifiedDateTime": { - "type": "string", - "format": "date-time", - "description": "Represents the project last modification datetime.", - "readOnly": true - }, - "lastTrainedDateTime": { - "type": "string", - "format": "date-time", - "description": "Represents the project last training datetime.", - "readOnly": true - }, - "lastDeployedDateTime": { - "type": "string", - "format": "date-time", - "description": "Represents the project last deployment datetime.", - "readOnly": true - } - }, - "description": "A resource was successfully created.", - "required": [ - "projectName", - "projectKind", - "storageInputContainerName", - "language", - "createdDateTime", - "lastModifiedDateTime", - "lastTrainedDateTime", - "lastDeployedDateTime" - ], - "x-cadl-name": "Azure.Core.Foundations.ResourceCreatedResponse" + "$ref": "#/definitions/Project" } }, "default": { @@ -330,15 +162,15 @@ "operationId": "Projects_Get", "description": "Gets the details of a project.", "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, { "name": "projectName", "in": "path", "required": true, "description": "The project name.", "type": "string" - }, - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" } ], "responses": { @@ -360,15 +192,15 @@ "operationId": "Projects_Delete", "description": "Deletes a project.", "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, { "name": "projectName", "in": "path", "required": true, "description": "The project name.", "type": "string" - }, - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" } ], "responses": { @@ -397,11 +229,12 @@ "description": "Error object that describes the error when status is \"Failed\"." } }, + "description": "Provides status details for long running operations.", "required": [ "id", "status" ], - "x-cadl-name": "Azure.Core.Foundations.AcceptedResponse" + "x-cadl-name": "Azure.Core.Foundations.OperationStatus" } }, "default": { @@ -418,6 +251,9 @@ "operationId": "Projects_Export", "description": "Triggers a job to export a project's data.", "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, { "name": "projectName", "in": "path", @@ -427,9 +263,6 @@ }, { "$ref": "#/parameters/ExportParams" - }, - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" } ], "responses": { @@ -457,15 +290,15 @@ "operationId": "Projects_Importx", "description": "Triggers a job to export a project's data.", "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, { "name": "projectName", "in": "path", "required": true, "description": "The project name.", "type": "string" - }, - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" } ], "responses": { @@ -493,6 +326,9 @@ "operationId": "Projects_Train", "description": "Triggers a training job for a project.", "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, { "name": "projectName", "in": "path", @@ -500,9 +336,6 @@ "description": "The project name.", "type": "string" }, - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, { "name": "body", "in": "body", @@ -538,15 +371,15 @@ "operationId": "Deployments_ListDeployments", "description": "Lists the existing deployments.", "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, { "name": "projectName", "in": "path", "required": true, "description": "The project name.", "type": "string" - }, - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" } ], "responses": { @@ -575,7 +408,7 @@ "required": [ "value" ], - "x-cadl-name": "Azure.Core.Foundations.CustomPage" + "x-cadl-name": "Azure.Core.Foundations.CustomPage" } }, "default": { @@ -595,6 +428,9 @@ "operationId": "Deployments_GetDeployment", "description": "Gets the details of a deployment.", "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, { "name": "projectName", "in": "path", @@ -608,9 +444,6 @@ "required": true, "description": "The name of the deployment.", "type": "string" - }, - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" } ], "responses": { @@ -632,6 +465,9 @@ "operationId": "Deployments_DeployProject", "description": "Creates a new deployment or replaces an existing one.", "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, { "name": "projectName", "in": "path", @@ -647,7 +483,13 @@ "type": "string" }, { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + "name": "resource", + "in": "body", + "required": true, + "description": "The resource instance.", + "schema": { + "$ref": "#/definitions/Deployment" + } } ], "responses": { @@ -661,18 +503,7 @@ } }, "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The name of the deployment.", - "readOnly": true - } - }, - "required": [ - "name" - ], - "x-cadl-name": "Azure.Core.Foundations.ResourceOkResponse" + "$ref": "#/definitions/Deployment" } }, "201": { @@ -685,19 +516,7 @@ } }, "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The name of the deployment.", - "readOnly": true - } - }, - "description": "A resource was successfully created.", - "required": [ - "name" - ], - "x-cadl-name": "Azure.Core.Foundations.ResourceCreatedResponse" + "$ref": "#/definitions/Deployment" } }, "default": { @@ -712,6 +531,9 @@ "operationId": "Deployments_DeleteDeployment", "description": "Deletes a project deployment.", "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, { "name": "projectName", "in": "path", @@ -725,9 +547,6 @@ "required": true, "description": "The name of the deployment.", "type": "string" - }, - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" } ], "responses": { @@ -756,11 +575,12 @@ "description": "Error object that describes the error when status is \"Failed\"." } }, + "description": "Provides status details for long running operations.", "required": [ "id", "status" ], - "x-cadl-name": "Azure.Core.Foundations.AcceptedResponse" + "x-cadl-name": "Azure.Core.Foundations.OperationStatus" } }, "default": { @@ -777,6 +597,9 @@ "operationId": "Jobs_GetDeploymentStatus", "description": "Gets the status of an existing deployment job.", "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, { "name": "projectName", "in": "path", @@ -797,9 +620,6 @@ "required": true, "description": "The job ID.", "type": "string" - }, - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" } ], "responses": { @@ -823,6 +643,9 @@ "operationId": "Jobs_GetSwapDeploymentsStatus", "description": "Gets the status of an existing swap deployment job.", "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, { "name": "projectName", "in": "path", @@ -843,9 +666,6 @@ "required": true, "description": "The job ID.", "type": "string" - }, - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" } ], "responses": { @@ -869,6 +689,9 @@ "operationId": "Deployments_SwapDeployments", "description": "Swaps two existing deployments with each other.", "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, { "name": "projectName", "in": "path", @@ -876,9 +699,6 @@ "description": "The project name.", "type": "string" }, - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, { "$ref": "#/parameters/SwapDeploymentsParams" } @@ -908,6 +728,9 @@ "operationId": "Global_GetSupportedLanguages", "description": "Gets the supported languages.", "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, { "$ref": "#/parameters/Azure.Core.TopQueryParameter" }, @@ -916,9 +739,6 @@ }, { "$ref": "#/parameters/Azure.Core.MaxPageSizeQueryParameter" - }, - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" } ], "responses": { @@ -945,6 +765,9 @@ "operationId": "Global_ListTrainingConfigVersions", "description": "Lists training configuration versions.", "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, { "$ref": "#/parameters/Azure.Core.TopQueryParameter" }, @@ -953,9 +776,6 @@ }, { "$ref": "#/parameters/Azure.Core.MaxPageSizeQueryParameter" - }, - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" } ], "responses": { @@ -1389,6 +1209,41 @@ }, "description": "Represents the settings used to define the project behavior." }, + "ProjectUpdate": { + "type": "object", + "properties": { + "projectKind": { + "$ref": "#/definitions/ProjectKind", + "description": "The project kind." + }, + "storageInputContainerName": { + "type": "string", + "description": "The storage container name." + }, + "settings": { + "$ref": "#/definitions/ProjectSettings", + "description": "The project settings." + }, + "multilingual": { + "type": "boolean", + "description": "Whether the project would be used for multiple languages or not." + }, + "description": { + "type": "string", + "description": "The project description." + }, + "language": { + "type": "string", + "description": "The project language. This is BCP-47 representation of a language. For example, use \"en\" for English, \"en-gb\" for English (UK), \"es\" for Spanish etc." + } + }, + "description": "The details of a project.", + "required": [ + "projectKind", + "storageInputContainerName", + "language" + ] + }, "SupportedLanguage": { "type": "object", "properties": { diff --git a/packages/cadl-rlc-test/test/authoring/cadl-output/review/authoring.api.md b/packages/cadl-rlc-test/test/authoring/cadl-output/review/authoring.api.md index 5b30f97774..c7b5a45b90 100644 --- a/packages/cadl-rlc-test/test/authoring/cadl-output/review/authoring.api.md +++ b/packages/cadl-rlc-test/test/authoring/cadl-output/review/authoring.api.md @@ -60,8 +60,7 @@ export interface CreateOrUpdate201Response extends HttpResponse { // @public (undocumented) export interface CreateOrUpdateBodyParam { - // (undocumented) - body?: ProjectResourceMergeAndPatch; + body: ProjectResourceMergeAndPatch; } // @public (undocumented) @@ -132,6 +131,10 @@ export type DeleteDeploymentParameters = RequestParameters; // @public (undocumented) export type DeleteParameters = RequestParameters; +// @public +export interface Deployment { +} + // @public export interface DeploymentJobOutput { readonly createdDateTime: string; @@ -185,6 +188,11 @@ export interface DeployProject201Response extends HttpResponse { status: "201"; } +// @public (undocumented) +export interface DeployProjectBodyParam { + body: Deployment; +} + // @public (undocumented) export interface DeployProjectDefaultResponse extends HttpResponse { // (undocumented) @@ -194,7 +202,7 @@ export interface DeployProjectDefaultResponse extends HttpResponse { } // @public (undocumented) -export type DeployProjectParameters = RequestParameters; +export type DeployProjectParameters = DeployProjectBodyParam & RequestParameters; // @public export interface ErrorModelOutput { @@ -273,7 +281,7 @@ export interface GetDefaultResponse extends HttpResponse { export interface GetDeployment { delete(options?: DeleteDeploymentParameters): StreamableMethod; get(options?: GetDeploymentParameters): StreamableMethod; - put(options?: DeployProjectParameters): StreamableMethod; + put(options: DeployProjectParameters): StreamableMethod; } // @public @@ -527,20 +535,7 @@ export interface ListProjectsDefaultResponse extends HttpResponse { } // @public (undocumented) -export type ListProjectsParameters = ListProjectsQueryParam & RequestParameters; - -// @public (undocumented) -export interface ListProjectsQueryParam { - // (undocumented) - queryParameters?: ListProjectsQueryParamProperties; -} - -// @public (undocumented) -export interface ListProjectsQueryParamProperties { - maxpagesize?: number; - skip?: number; - top?: number; -} +export type ListProjectsParameters = RequestParameters; // @public (undocumented) export interface ListTrainingConfigVersions { @@ -649,7 +644,7 @@ export interface ProjectOutput { storageInputContainerName: string; } -// @public (undocumented) +// @public export type ProjectResourceMergeAndPatch = Partial; // @public (undocumented) diff --git a/packages/cadl-rlc-test/test/authoring/cadl-output/src/clientDefinitions.ts b/packages/cadl-rlc-test/test/authoring/cadl-output/src/clientDefinitions.ts index 8a8224d6b9..0ab3df5ad5 100644 --- a/packages/cadl-rlc-test/test/authoring/cadl-output/src/clientDefinitions.ts +++ b/packages/cadl-rlc-test/test/authoring/cadl-output/src/clientDefinitions.ts @@ -111,7 +111,7 @@ export interface GetDeployment { ): StreamableMethod; /** Creates a new deployment or replaces an existing one. */ put( - options?: DeployProjectParameters + options: DeployProjectParameters ): StreamableMethod< | DeployProject200Response | DeployProject201Response diff --git a/packages/cadl-rlc-test/test/authoring/cadl-output/src/models.ts b/packages/cadl-rlc-test/test/authoring/cadl-output/src/models.ts index ef15b35655..e23a1b764c 100644 --- a/packages/cadl-rlc-test/test/authoring/cadl-output/src/models.ts +++ b/packages/cadl-rlc-test/test/authoring/cadl-output/src/models.ts @@ -26,6 +26,9 @@ export interface TrainingJobOptions { modelLabel: string; } +/** The details of a project deployment. */ +export interface Deployment {} + /** Swap deployment options. */ export interface SwapDeploymentsOptions { /** Represents the first deployment name. */ diff --git a/packages/cadl-rlc-test/test/authoring/cadl-output/src/parameters.ts b/packages/cadl-rlc-test/test/authoring/cadl-output/src/parameters.ts index 1e45fded61..0fd38f8e2a 100644 --- a/packages/cadl-rlc-test/test/authoring/cadl-output/src/parameters.ts +++ b/packages/cadl-rlc-test/test/authoring/cadl-output/src/parameters.ts @@ -2,12 +2,19 @@ // Licensed under the MIT license. import { RequestParameters } from "@azure-rest/core-client"; -import { Project, TrainingJobOptions, SwapDeploymentsOptions } from "./models"; - +import { + Project, + TrainingJobOptions, + Deployment, + SwapDeploymentsOptions, +} from "./models"; + +/** The resource instance. */ export type ProjectResourceMergeAndPatch = Partial; export interface CreateOrUpdateBodyParam { - body?: ProjectResourceMergeAndPatch; + /** The resource instance. */ + body: ProjectResourceMergeAndPatch; } export interface CreateOrUpdateMediaTypesParam { @@ -20,21 +27,7 @@ export type CreateOrUpdateParameters = CreateOrUpdateMediaTypesParam & RequestParameters; export type GetParameters = RequestParameters; export type DeleteParameters = RequestParameters; - -export interface ListProjectsQueryParamProperties { - /** The number of result items to return. */ - top?: number; - /** The number of result items to skip. */ - skip?: number; - /** The maximum number of result items per page. */ - maxpagesize?: number; -} - -export interface ListProjectsQueryParam { - queryParameters?: ListProjectsQueryParamProperties; -} - -export type ListProjectsParameters = ListProjectsQueryParam & RequestParameters; +export type ListProjectsParameters = RequestParameters; export interface ExportQueryParamProperties { /** The project file version. */ @@ -55,7 +48,14 @@ export interface TrainBodyParam { export type TrainParameters = TrainBodyParam & RequestParameters; export type GetDeploymentParameters = RequestParameters; -export type DeployProjectParameters = RequestParameters; + +export interface DeployProjectBodyParam { + /** The resource instance. */ + body: Deployment; +} + +export type DeployProjectParameters = DeployProjectBodyParam & + RequestParameters; export type DeleteDeploymentParameters = RequestParameters; export type ListDeploymentsParameters = RequestParameters; diff --git a/packages/cadl-rlc-test/test/batch/cadl-output/review/batch.api.md b/packages/cadl-rlc-test/test/batch/cadl-output/review/batch.api.md index 80d0752baa..76be72dea3 100644 --- a/packages/cadl-rlc-test/test/batch/cadl-output/review/batch.api.md +++ b/packages/cadl-rlc-test/test/batch/cadl-output/review/batch.api.md @@ -16,7 +16,7 @@ import { StreamableMethod } from '@azure-rest/core-client'; // @public (undocumented) export interface AccountOperationsListPoolNodeCounts { - get(options: AccountOperationsListPoolNodeCountsParameters): StreamableMethod; + get(options?: AccountOperationsListPoolNodeCountsParameters): StreamableMethod; } // @public @@ -36,37 +36,11 @@ export interface AccountOperationsListPoolNodeCountsDefaultResponse extends Http } // @public (undocumented) -export interface AccountOperationsListPoolNodeCountsHeaderParam { - // (undocumented) - headers: RawHttpHeadersInput & AccountOperationsListPoolNodeCountsHeaders; -} - -// @public (undocumented) -export interface AccountOperationsListPoolNodeCountsHeaders { - "client-request-id": string; - "ocp-date": string; - "return-client-request-id": boolean; -} - -// @public (undocumented) -export type AccountOperationsListPoolNodeCountsParameters = AccountOperationsListPoolNodeCountsQueryParam & AccountOperationsListPoolNodeCountsHeaderParam & RequestParameters; - -// @public (undocumented) -export interface AccountOperationsListPoolNodeCountsQueryParam { - // (undocumented) - queryParameters: AccountOperationsListPoolNodeCountsQueryParamProperties; -} - -// @public (undocumented) -export interface AccountOperationsListPoolNodeCountsQueryParamProperties { - $filter: string; - maxresults: number; - timeout: number; -} +export type AccountOperationsListPoolNodeCountsParameters = RequestParameters; // @public (undocumented) export interface AccountOperationsListSupportedImages { - get(options: AccountOperationsListSupportedImagesParameters): StreamableMethod; + get(options?: AccountOperationsListSupportedImagesParameters): StreamableMethod; } // @public @@ -86,33 +60,7 @@ export interface AccountOperationsListSupportedImagesDefaultResponse extends Htt } // @public (undocumented) -export interface AccountOperationsListSupportedImagesHeaderParam { - // (undocumented) - headers: RawHttpHeadersInput & AccountOperationsListSupportedImagesHeaders; -} - -// @public (undocumented) -export interface AccountOperationsListSupportedImagesHeaders { - "client-request-id": string; - "ocp-date": string; - "return-client-request-id": boolean; -} - -// @public (undocumented) -export type AccountOperationsListSupportedImagesParameters = AccountOperationsListSupportedImagesQueryParam & AccountOperationsListSupportedImagesHeaderParam & RequestParameters; - -// @public (undocumented) -export interface AccountOperationsListSupportedImagesQueryParam { - // (undocumented) - queryParameters: AccountOperationsListSupportedImagesQueryParamProperties; -} - -// @public (undocumented) -export interface AccountOperationsListSupportedImagesQueryParamProperties { - $filter: string; - maxresults: number; - timeout: number; -} +export type AccountOperationsListSupportedImagesParameters = RequestParameters; // @public export interface AffinityInformation { @@ -132,7 +80,7 @@ export interface ApplicationListOutput { // @public (undocumented) export interface ApplicationOperationsGet { - get(options: ApplicationOperationsGetParameters): StreamableMethod; + get(options?: ApplicationOperationsGetParameters): StreamableMethod; } // @public @@ -152,35 +100,11 @@ export interface ApplicationOperationsGetDefaultResponse extends HttpResponse { } // @public (undocumented) -export interface ApplicationOperationsGetHeaderParam { - // (undocumented) - headers: RawHttpHeadersInput & ApplicationOperationsGetHeaders; -} - -// @public (undocumented) -export interface ApplicationOperationsGetHeaders { - "client-request-id": string; - "ocp-date": string; - "return-client-request-id": boolean; -} - -// @public (undocumented) -export type ApplicationOperationsGetParameters = ApplicationOperationsGetQueryParam & ApplicationOperationsGetHeaderParam & RequestParameters; - -// @public (undocumented) -export interface ApplicationOperationsGetQueryParam { - // (undocumented) - queryParameters: ApplicationOperationsGetQueryParamProperties; -} - -// @public (undocumented) -export interface ApplicationOperationsGetQueryParamProperties { - timeout: number; -} +export type ApplicationOperationsGetParameters = RequestParameters; // @public (undocumented) export interface ApplicationOperationsList { - get(options: ApplicationOperationsListParameters): StreamableMethod; + get(options?: ApplicationOperationsListParameters): StreamableMethod; } // @public @@ -200,37 +124,12 @@ export interface ApplicationOperationsListDefaultResponse extends HttpResponse { } // @public (undocumented) -export interface ApplicationOperationsListHeaderParam { - // (undocumented) - headers: RawHttpHeadersInput & ApplicationOperationsListHeaders; -} - -// @public (undocumented) -export interface ApplicationOperationsListHeaders { - "client-request-id": string; - "ocp-date": string; - "return-client-request-id": boolean; -} - -// @public (undocumented) -export type ApplicationOperationsListParameters = ApplicationOperationsListQueryParam & ApplicationOperationsListHeaderParam & RequestParameters; - -// @public (undocumented) -export interface ApplicationOperationsListQueryParam { - // (undocumented) - queryParameters: ApplicationOperationsListQueryParamProperties; -} - -// @public (undocumented) -export interface ApplicationOperationsListQueryParamProperties { - maxresults: number; - timeout: number; -} +export type ApplicationOperationsListParameters = RequestParameters; // @public export interface ApplicationOutput { displayName: string; - id: string; + readonly id: string; versions: string[]; } @@ -276,7 +175,6 @@ export interface AutoPoolSpecificationOutput { export interface AutoScaleRun { error?: AutoScaleRunError; results?: string; - timestamp: Date | string; } // @public @@ -297,7 +195,7 @@ export interface AutoScaleRunErrorOutput { export interface AutoScaleRunOutput { error?: AutoScaleRunErrorOutput; results?: string; - timestamp: string; + readonly timestamp: string; } // @public @@ -1099,7 +997,7 @@ export interface ComputeNodeExtensionOperationsListQueryParamProperties { // @public export interface ComputeNodeGetRemoteLoginSettingsResultOutput { - remoteLoginIPAddress: string; + readonly remoteLoginIPAddress: string; remoteLoginPort: number; } @@ -1698,8 +1596,7 @@ export interface ComputeNodeOperationsUploadBatchServiceLogs201Response extends // @public (undocumented) export interface ComputeNodeOperationsUploadBatchServiceLogsBodyParam { - // (undocumented) - body?: UploadBatchServiceLogsResult; + body: UploadBatchServiceLogsResult; } // @public (undocumented) @@ -1711,31 +1608,7 @@ export interface ComputeNodeOperationsUploadBatchServiceLogsDefaultResponse exte } // @public (undocumented) -export interface ComputeNodeOperationsUploadBatchServiceLogsHeaderParam { - // (undocumented) - headers: RawHttpHeadersInput & ComputeNodeOperationsUploadBatchServiceLogsHeaders; -} - -// @public (undocumented) -export interface ComputeNodeOperationsUploadBatchServiceLogsHeaders { - "client-request-id": string; - "ocp-date": string; - "return-client-request-id": boolean; -} - -// @public (undocumented) -export type ComputeNodeOperationsUploadBatchServiceLogsParameters = ComputeNodeOperationsUploadBatchServiceLogsQueryParam & ComputeNodeOperationsUploadBatchServiceLogsHeaderParam & ComputeNodeOperationsUploadBatchServiceLogsBodyParam & RequestParameters; - -// @public (undocumented) -export interface ComputeNodeOperationsUploadBatchServiceLogsQueryParam { - // (undocumented) - queryParameters: ComputeNodeOperationsUploadBatchServiceLogsQueryParamProperties; -} - -// @public (undocumented) -export interface ComputeNodeOperationsUploadBatchServiceLogsQueryParamProperties { - timeout: number; -} +export type ComputeNodeOperationsUploadBatchServiceLogsParameters = ComputeNodeOperationsUploadBatchServiceLogsBodyParam & RequestParameters; // @public export interface ComputeNodeOutput { @@ -2362,7 +2235,7 @@ export interface ImageInformationOutput { batchSupportEndOfLife?: string; capabilities?: string[]; imageReference: ImageReferenceOutput; - nodeAgentSKUId: string; + readonly nodeAgentSKUId: string; osType: "linux" | "windows"; verificationType: "verified" | "unverified"; } @@ -4101,7 +3974,6 @@ export interface JobStatistics { readIOGiB: number; readIOps: number; startTime: Date | string; - url: string; userCPUTime: string; waitTime: string; wallClockTime: string; @@ -4119,7 +3991,7 @@ export interface JobStatisticsOutput { readIOGiB: number; readIOps: number; startTime: string; - url: string; + readonly url: string; userCPUTime: string; waitTime: string; wallClockTime: string; @@ -4447,7 +4319,7 @@ export interface PoolNodeCountsListOutput { export interface PoolNodeCountsOutput { dedicated?: NodeCountsOutput; lowPriority?: NodeCountsOutput; - poolId: string; + readonly poolId: string; } // @public (undocumented) @@ -4900,7 +4772,7 @@ export interface PoolOperationsListQueryParamProperties { // @public (undocumented) export interface PoolOperationsListUsageMetrics { - get(options: PoolOperationsListUsageMetricsParameters): StreamableMethod; + get(options?: PoolOperationsListUsageMetricsParameters): StreamableMethod; } // @public @@ -4920,35 +4792,7 @@ export interface PoolOperationsListUsageMetricsDefaultResponse extends HttpRespo } // @public (undocumented) -export interface PoolOperationsListUsageMetricsHeaderParam { - // (undocumented) - headers: RawHttpHeadersInput & PoolOperationsListUsageMetricsHeaders; -} - -// @public (undocumented) -export interface PoolOperationsListUsageMetricsHeaders { - "client-request-id": string; - "ocp-date": string; - "return-client-request-id": boolean; -} - -// @public (undocumented) -export type PoolOperationsListUsageMetricsParameters = PoolOperationsListUsageMetricsQueryParam & PoolOperationsListUsageMetricsHeaderParam & RequestParameters; - -// @public (undocumented) -export interface PoolOperationsListUsageMetricsQueryParam { - // (undocumented) - queryParameters: PoolOperationsListUsageMetricsQueryParamProperties; -} - -// @public (undocumented) -export interface PoolOperationsListUsageMetricsQueryParamProperties { - $filter: string; - endtime: string; - maxresults: number; - starttime: string; - timeout: number; -} +export type PoolOperationsListUsageMetricsParameters = RequestParameters; // @public export interface PoolOperationsPatch204Response extends HttpResponse { @@ -5266,7 +5110,6 @@ export interface PoolStatistics { lastUpdateTime: Date | string; resourceStats?: ResourceStatistics; startTime: Date | string; - url: string; usageStats?: UsageStatistics; } @@ -5275,7 +5118,7 @@ export interface PoolStatisticsOutput { lastUpdateTime: string; resourceStats?: ResourceStatisticsOutput; startTime: string; - url: string; + readonly url: string; usageStats?: UsageStatisticsOutput; } @@ -5288,7 +5131,7 @@ export interface PoolUsageMetricsListOutput { // @public export interface PoolUsageMetricsOutput { endTime: string; - poolId: string; + readonly poolId: string; startTime: string; totalCoreHours: number; vmSize: string; @@ -5584,7 +5427,7 @@ export interface TaskCountsOutput { // @public export interface TaskCountsResultOutput { - taskCounts: TaskCountsOutput; + readonly taskCounts: TaskCountsOutput; taskSlotCounts: TaskSlotCountsOutput; } @@ -6170,7 +6013,6 @@ export interface TaskStatisticsOutput { // @public export interface UploadBatchServiceLogsResult { numberOfFilesUploaded: number; - virtualDirectoryName: string; } // @public diff --git a/packages/cadl-rlc-test/test/batch/cadl-output/src/clientDefinitions.ts b/packages/cadl-rlc-test/test/batch/cadl-output/src/clientDefinitions.ts index 73df1c1cda..22e3517c0a 100644 --- a/packages/cadl-rlc-test/test/batch/cadl-output/src/clientDefinitions.ts +++ b/packages/cadl-rlc-test/test/batch/cadl-output/src/clientDefinitions.ts @@ -250,7 +250,7 @@ export interface ApplicationOperationsList { * API. */ get( - options: ApplicationOperationsListParameters + options?: ApplicationOperationsListParameters ): StreamableMethod< | ApplicationOperationsList200Response | ApplicationOperationsListDefaultResponse @@ -266,7 +266,7 @@ export interface ApplicationOperationsGet { * API. */ get( - options: ApplicationOperationsGetParameters + options?: ApplicationOperationsGetParameters ): StreamableMethod< | ApplicationOperationsGet200Response | ApplicationOperationsGetDefaultResponse @@ -283,7 +283,7 @@ export interface PoolOperationsListUsageMetrics { * last aggregation interval is returned. */ get( - options: PoolOperationsListUsageMetricsParameters + options?: PoolOperationsListUsageMetricsParameters ): StreamableMethod< | PoolOperationsListUsageMetrics200Response | PoolOperationsListUsageMetricsDefaultResponse @@ -475,7 +475,7 @@ export interface PoolOperationsRemoveNodes { export interface AccountOperationsListSupportedImages { /** Lists all Virtual Machine Images supported by the Azure Batch service. */ get( - options: AccountOperationsListSupportedImagesParameters + options?: AccountOperationsListSupportedImagesParameters ): StreamableMethod< | AccountOperationsListSupportedImages200Response | AccountOperationsListSupportedImagesDefaultResponse @@ -489,7 +489,7 @@ export interface AccountOperationsListPoolNodeCounts { * use a list query. */ get( - options: AccountOperationsListPoolNodeCountsParameters + options?: AccountOperationsListPoolNodeCountsParameters ): StreamableMethod< | AccountOperationsListPoolNodeCounts200Response | AccountOperationsListPoolNodeCountsDefaultResponse diff --git a/packages/cadl-rlc-test/test/batch/cadl-output/src/models.ts b/packages/cadl-rlc-test/test/batch/cadl-output/src/models.ts index 97fad4fcb0..1e14c5f2a1 100644 --- a/packages/cadl-rlc-test/test/batch/cadl-output/src/models.ts +++ b/packages/cadl-rlc-test/test/batch/cadl-output/src/models.ts @@ -3,8 +3,6 @@ /** Contains utilization and resource usage statistics for the lifetime of a Pool. */ export interface PoolStatistics { - /** The URL for the statistics. */ - url: string; /** The start time of the time range covered by the statistics. */ startTime: Date | string; /** @@ -514,8 +512,6 @@ export interface NameValuePair { /** The results and errors from an execution of a Pool autoscale formula. */ export interface AutoScaleRun { - /** The time at which the autoscale formula was last evaluated. */ - timestamp: Date | string; /** * Each variable value is returned in the form $variable=value, and variables are * separated by semicolons. @@ -1208,8 +1204,6 @@ export interface NodeRemoveParameters { /** Resource usage statistics for a Job. */ export interface JobStatistics { - /** The URL of the statistics. */ - url: string; /** The start time of the time range covered by the statistics. */ startTime: Date | string; /** @@ -2951,11 +2945,6 @@ export interface NodeDisableSchedulingParameters { /** The result of uploading Batch service log files from a specific Compute Node. */ export interface UploadBatchServiceLogsResult { - /** - * The virtual directory name is part of the blob name for each log file uploaded, - * and it is built based poolId, nodeId and a unique identifier. - */ - virtualDirectoryName: string; /** The number of log files which will be uploaded. */ numberOfFilesUploaded: number; } diff --git a/packages/cadl-rlc-test/test/batch/cadl-output/src/outputModels.ts b/packages/cadl-rlc-test/test/batch/cadl-output/src/outputModels.ts index 78d35f274e..5637c5d90d 100644 --- a/packages/cadl-rlc-test/test/batch/cadl-output/src/outputModels.ts +++ b/packages/cadl-rlc-test/test/batch/cadl-output/src/outputModels.ts @@ -4,7 +4,7 @@ /** Contains information about an application in an Azure Batch Account. */ export interface ApplicationOutput { /** A string that uniquely identifies the application within the Account. */ - id: string; + readonly id: string; /** The display name for the application. */ displayName: string; /** The list of available versions of the application. */ @@ -50,7 +50,7 @@ export interface InnerErrorOutput { /** Usage metrics for a Pool across an aggregation interval. */ export interface PoolUsageMetricsOutput { /** The ID of the Pool whose metrics are aggregated in this entry. */ - poolId: string; + readonly poolId: string; /** The start time of the aggregation interval covered by this entry. */ startTime: string; /** The end time of the aggregation interval covered by this entry. */ @@ -76,7 +76,7 @@ export interface PoolUsageMetricsListOutput { /** Contains utilization and resource usage statistics for the lifetime of a Pool. */ export interface PoolStatisticsOutput { /** The URL for the statistics. */ - url: string; + readonly url: string; /** The start time of the time range covered by the statistics. */ startTime: string; /** @@ -648,7 +648,7 @@ export interface NameValuePairOutput { /** The results and errors from an execution of a Pool autoscale formula. */ export interface AutoScaleRunOutput { /** The time at which the autoscale formula was last evaluated. */ - timestamp: string; + readonly timestamp: string; /** * Each variable value is returned in the form $variable=value, and variables are * separated by semicolons. @@ -1248,7 +1248,7 @@ export interface BatchPoolListResultOutput { */ export interface ImageInformationOutput { /** The ID of the Compute Node agent SKU which the Image supports. */ - nodeAgentSKUId: string; + readonly nodeAgentSKUId: string; /** * A reference to an Azure Virtual Machines Marketplace Image or a Shared Image * Gallery Image. To get the list of all Azure Marketplace Image references @@ -1286,7 +1286,7 @@ export interface ImageInformationListOutput { /** The number of Compute Nodes in each state for a Pool. */ export interface PoolNodeCountsOutput { /** The ID of the Pool. */ - poolId: string; + readonly poolId: string; /** The number of Compute Nodes in each Compute Node state. */ dedicated?: NodeCountsOutput; /** The number of Compute Nodes in each Compute Node state. */ @@ -1336,7 +1336,7 @@ export interface PoolNodeCountsListOutput { /** Resource usage statistics for a Job. */ export interface JobStatisticsOutput { /** The URL of the statistics. */ - url: string; + readonly url: string; /** The start time of the time range covered by the statistics. */ startTime: string; /** @@ -2417,7 +2417,7 @@ export interface JobReleaseTaskExecutionInformationOutput { /** The Task and TaskSlot counts for a Job. */ export interface TaskCountsResultOutput { /** The Task counts for a Job. */ - taskCounts: TaskCountsOutput; + readonly taskCounts: TaskCountsOutput; /** The TaskSlot counts for a Job. */ taskSlotCounts: TaskSlotCountsOutput; } @@ -3661,7 +3661,7 @@ export interface VirtualMachineInfoOutput { /** The remote login settings for a Compute Node. */ export interface ComputeNodeGetRemoteLoginSettingsResultOutput { /** The IP address used for remote login to the Compute Node. */ - remoteLoginIPAddress: string; + readonly remoteLoginIPAddress: string; /** The port used for remote login to the Compute Node. */ remoteLoginPort: number; } diff --git a/packages/cadl-rlc-test/test/batch/cadl-output/src/parameters.ts b/packages/cadl-rlc-test/test/batch/cadl-output/src/parameters.ts index 3f21881526..c9cf8105d0 100644 --- a/packages/cadl-rlc-test/test/batch/cadl-output/src/parameters.ts +++ b/packages/cadl-rlc-test/test/batch/cadl-output/src/parameters.ts @@ -27,143 +27,9 @@ import { UploadBatchServiceLogsResult, } from "./models"; -export interface ApplicationOperationsListHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id": string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id": boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date": string; -} - -export interface ApplicationOperationsListQueryParamProperties { - /** - * The maximum number of items to return in the response. A maximum of 1000 - * applications can be returned. - */ - maxresults: number; - /** - * The maximum time that the server can spend processing the request, in seconds. - * The default is 30 seconds. - */ - timeout: number; -} - -export interface ApplicationOperationsListQueryParam { - queryParameters: ApplicationOperationsListQueryParamProperties; -} - -export interface ApplicationOperationsListHeaderParam { - headers: RawHttpHeadersInput & ApplicationOperationsListHeaders; -} - -export type ApplicationOperationsListParameters = - ApplicationOperationsListQueryParam & - ApplicationOperationsListHeaderParam & - RequestParameters; - -export interface ApplicationOperationsGetHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id": string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id": boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date": string; -} - -export interface ApplicationOperationsGetQueryParamProperties { - /** - * The maximum time that the server can spend processing the request, in seconds. - * The default is 30 seconds. - */ - timeout: number; -} - -export interface ApplicationOperationsGetQueryParam { - queryParameters: ApplicationOperationsGetQueryParamProperties; -} - -export interface ApplicationOperationsGetHeaderParam { - headers: RawHttpHeadersInput & ApplicationOperationsGetHeaders; -} - -export type ApplicationOperationsGetParameters = - ApplicationOperationsGetQueryParam & - ApplicationOperationsGetHeaderParam & - RequestParameters; - -export interface PoolOperationsListUsageMetricsHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id": string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id": boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date": string; -} - -export interface PoolOperationsListUsageMetricsQueryParamProperties { - /** - * The earliest time from which to include metrics. This must be at least two and - * a half hours before the current time. If not specified this defaults to the - * start time of the last aggregation interval currently available. - */ - starttime: string; - /** - * The latest time from which to include metrics. This must be at least two hours - * before the current time. If not specified this defaults to the end time of the - * last aggregation interval currently available. - */ - endtime: string; - /** - * An OData $filter clause. For more information on constructing this filter, see - * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-account-usage-metrics. - */ - $filter: string; - /** - * The maximum number of items to return in the response. A maximum of 1000 - * results will be returned. - */ - maxresults: number; - /** - * The maximum time that the server can spend processing the request, in seconds. - * The default is 30 seconds. - */ - timeout: number; -} - -export interface PoolOperationsListUsageMetricsQueryParam { - queryParameters: PoolOperationsListUsageMetricsQueryParamProperties; -} - -export interface PoolOperationsListUsageMetricsHeaderParam { - headers: RawHttpHeadersInput & PoolOperationsListUsageMetricsHeaders; -} - -export type PoolOperationsListUsageMetricsParameters = - PoolOperationsListUsageMetricsQueryParam & - PoolOperationsListUsageMetricsHeaderParam & - RequestParameters; +export type ApplicationOperationsListParameters = RequestParameters; +export type ApplicationOperationsGetParameters = RequestParameters; +export type PoolOperationsListUsageMetricsParameters = RequestParameters; export interface PoolOperationsGetAllLifetimeStatisticsHeaders { /** @@ -927,97 +793,8 @@ export type PoolOperationsRemoveNodesParameters = PoolOperationsRemoveNodesHeaderParam & PoolOperationsRemoveNodesBodyParam & RequestParameters; - -export interface AccountOperationsListSupportedImagesHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id": string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id": boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date": string; -} - -export interface AccountOperationsListSupportedImagesQueryParamProperties { - /** - * An OData $filter clause. For more information on constructing this filter, see - * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-support-images. - */ - $filter: string; - /** - * The maximum number of items to return in the response. A maximum of 1000 - * results will be returned. - */ - maxresults: number; - /** - * The maximum time that the server can spend processing the request, in seconds. - * The default is 30 seconds. - */ - timeout: number; -} - -export interface AccountOperationsListSupportedImagesQueryParam { - queryParameters: AccountOperationsListSupportedImagesQueryParamProperties; -} - -export interface AccountOperationsListSupportedImagesHeaderParam { - headers: RawHttpHeadersInput & AccountOperationsListSupportedImagesHeaders; -} - -export type AccountOperationsListSupportedImagesParameters = - AccountOperationsListSupportedImagesQueryParam & - AccountOperationsListSupportedImagesHeaderParam & - RequestParameters; - -export interface AccountOperationsListPoolNodeCountsHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id": string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id": boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date": string; -} - -export interface AccountOperationsListPoolNodeCountsQueryParamProperties { - /** - * An OData $filter clause. For more information on constructing this filter, see - * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch. - */ - $filter: string; - /** The maximum number of items to return in the response. */ - maxresults: number; - /** - * The maximum time that the server can spend processing the request, in seconds. - * The default is 30 seconds. - */ - timeout: number; -} - -export interface AccountOperationsListPoolNodeCountsQueryParam { - queryParameters: AccountOperationsListPoolNodeCountsQueryParamProperties; -} - -export interface AccountOperationsListPoolNodeCountsHeaderParam { - headers: RawHttpHeadersInput & AccountOperationsListPoolNodeCountsHeaders; -} - -export type AccountOperationsListPoolNodeCountsParameters = - AccountOperationsListPoolNodeCountsQueryParam & - AccountOperationsListPoolNodeCountsHeaderParam & - RequestParameters; +export type AccountOperationsListSupportedImagesParameters = RequestParameters; +export type AccountOperationsListPoolNodeCountsParameters = RequestParameters; export interface JobOperationsGetAllLifetimeStatisticsHeaders { /** @@ -3829,48 +3606,13 @@ export type ComputeNodeOperationsGetRemoteDesktopParameters = ComputeNodeOperationsGetRemoteDesktopHeaderParam & RequestParameters; -export interface ComputeNodeOperationsUploadBatchServiceLogsHeaders { - /** - * The caller-generated request identity, in the form of a GUID with no decoration - * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. - */ - "client-request-id": string; - /** Whether the server should return the client-request-id in the response. */ - "return-client-request-id": boolean; - /** - * The time the request was issued. Client libraries typically set this to the - * current system clock time; set it explicitly if you are calling the REST API - * directly. - */ - "ocp-date": string; -} - export interface ComputeNodeOperationsUploadBatchServiceLogsBodyParam { - body?: UploadBatchServiceLogsResult; -} - -export interface ComputeNodeOperationsUploadBatchServiceLogsQueryParamProperties { - /** - * The maximum time that the server can spend processing the request, in seconds. - * The default is 30 seconds. - */ - timeout: number; -} - -export interface ComputeNodeOperationsUploadBatchServiceLogsQueryParam { - queryParameters: ComputeNodeOperationsUploadBatchServiceLogsQueryParamProperties; -} - -export interface ComputeNodeOperationsUploadBatchServiceLogsHeaderParam { - headers: RawHttpHeadersInput & - ComputeNodeOperationsUploadBatchServiceLogsHeaders; + /** The resource instance. */ + body: UploadBatchServiceLogsResult; } export type ComputeNodeOperationsUploadBatchServiceLogsParameters = - ComputeNodeOperationsUploadBatchServiceLogsQueryParam & - ComputeNodeOperationsUploadBatchServiceLogsHeaderParam & - ComputeNodeOperationsUploadBatchServiceLogsBodyParam & - RequestParameters; + ComputeNodeOperationsUploadBatchServiceLogsBodyParam & RequestParameters; export interface ComputeNodeOperationsListHeaders { /** diff --git a/packages/cadl-rlc-test/test/batch/spec/models.cadl b/packages/cadl-rlc-test/test/batch/spec/models.cadl index 4c5d243373..068b8d8b39 100644 --- a/packages/cadl-rlc-test/test/batch/spec/models.cadl +++ b/packages/cadl-rlc-test/test/batch/spec/models.cadl @@ -339,6 +339,7 @@ model Application { @doc("A string that uniquely identifies the application within the Account.") // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one @key + @visibility("read") id: string; @doc("The display name for the application.") @@ -400,6 +401,7 @@ model PoolUsageMetrics { @doc("The ID of the Pool whose metrics are aggregated in this entry.") // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one @key + @visibility("read") poolId: string; @doc("The start time of the aggregation interval covered by this entry.") @@ -440,6 +442,7 @@ model ImageInformation { @doc("The ID of the Compute Node agent SKU which the Image supports.") // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one @key + @visibility("read") nodeAgentSKUId: string; @doc(""" @@ -531,6 +534,7 @@ model PoolNodeCounts { @doc("The ID of the Pool.") // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one @key + @visibility("read") poolId: string; @doc("The number of Compute Nodes in each Compute Node state.") @@ -590,6 +594,7 @@ model PoolStatistics { @doc("The URL for the statistics.") // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one @key + @visibility("read") url: string; @doc("The start time of the time range covered by the statistics.") @@ -691,6 +696,7 @@ model JobStatistics { @doc("The URL of the statistics.") // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one @key + @visibility("read") url: string; @doc("The start time of the time range covered by the statistics.") @@ -3375,6 +3381,7 @@ model TaskCountsResult { @doc("The Task counts for a Job.") // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one @key + @visibility("read") taskCounts: TaskCounts; @doc("The TaskSlot counts for a Job.") @@ -3668,6 +3675,7 @@ model AutoScaleRun { @doc("The time at which the autoscale formula was last evaluated.") // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one @key + @visibility("read") timestamp: zonedDateTime; @doc(""" @@ -4835,6 +4843,7 @@ model ComputeNodeGetRemoteLoginSettingsResult { @doc("The IP address used for remote login to the Compute Node.") // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one @key + @visibility("read") remoteLoginIPAddress: string; @doc("The port used for remote login to the Compute Node.") @@ -4881,6 +4890,7 @@ and it is built based poolId, nodeId and a unique identifier. """) // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one @key + @visibility("read") virtualDirectoryName: string; @doc("The number of log files which will be uploaded.") diff --git a/packages/cadl-rlc-test/test/confidentialLedger/cadl-output/openapi.json b/packages/cadl-rlc-test/test/confidentialLedger/cadl-output/openapi.json index f7aa410d8e..ee5f98d6f7 100644 --- a/packages/cadl-rlc-test/test/confidentialLedger/cadl-output/openapi.json +++ b/packages/cadl-rlc-test/test/confidentialLedger/cadl-output/openapi.json @@ -185,28 +185,16 @@ "summary": "Writes a ledger entry.", "description": "A collection id may optionally be specified.", "parameters": [ - { - "$ref": "#/parameters/CollectionIdParameter" - }, { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { - "name": "body", + "name": "resource", "in": "body", + "required": true, + "description": "The resource instance.", "schema": { - "type": "object", - "properties": { - "contents": { - "type": "string", - "description": "Contents of the ledger entry." - } - }, - "description": "The template for adding updateable properties.", - "required": [ - "contents" - ], - "x-cadl-name": "Azure.Core.Foundations.ResourceCreateOrReplaceModel" + "$ref": "#/definitions/LedgerEntry" } } ], @@ -236,18 +224,15 @@ "summary": "Gets the ledger entry at the specified transaction id. A collection id may optionally be specified to indicate the collection from which to fetch the value.", "description": "Get a LedgerEntry", "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, { "name": "transactionId", "in": "path", "required": true, "description": "A unique identifier for the state of the ledger. If returned as part of a LedgerEntry, it indicates the state from which the entry was read.", "type": "string" - }, - { - "$ref": "#/parameters/CollectionIdParameter" - }, - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" } ], "responses": { @@ -272,15 +257,15 @@ "summary": "Gets a receipt certifying ledger contents at a particular transaction id.", "description": "Runs a custom action on LedgerEntry", "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, { "name": "transactionId", "in": "path", "required": true, "description": "A unique identifier for the state of the ledger. If returned as part of a LedgerEntry, it indicates the state from which the entry was read.", "type": "string" - }, - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" } ], "responses": { @@ -305,15 +290,15 @@ "summary": "Gets a receipt certifying ledger contents at a particular transaction id.", "description": "Runs a custom action on LedgerEntry", "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, { "name": "transactionId", "in": "path", "required": true, "description": "A unique identifier for the state of the ledger. If returned as part of a LedgerEntry, it indicates the state from which the entry was read.", "type": "string" - }, - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" } ], "responses": { @@ -339,10 +324,10 @@ "description": "Runs a custom action on LedgerEntry", "parameters": [ { - "$ref": "#/parameters/CollectionIdParameter" + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + "$ref": "#/parameters/CollectionIdParameter" } ], "responses": { @@ -367,6 +352,9 @@ "summary": "Deletes a user from the Confidential Ledger.", "description": "Delete a LedgerUser", "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, { "name": "userId", "in": "path", @@ -374,9 +362,6 @@ "description": "The user id, either an AAD object ID or certificate fingerprint.", "x-ms-skip-url-encoding": true, "type": "string" - }, - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" } ], "responses": { @@ -396,6 +381,9 @@ "summary": "Gets a user.", "description": "Get a LedgerUser", "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, { "name": "userId", "in": "path", @@ -403,9 +391,6 @@ "description": "The user id, either an AAD object ID or certificate fingerprint.", "x-ms-skip-url-encoding": true, "type": "string" - }, - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" } ], "responses": { @@ -428,6 +413,9 @@ "summary": "Adds a user or updates a user's fields.", "description": "Creates or updates a LedgerUser", "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, { "name": "userId", "in": "path", @@ -437,21 +425,12 @@ "type": "string" }, { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "body", + "name": "resource", "in": "body", + "required": true, + "description": "The resource instance.", "schema": { - "type": "object", - "properties": { - "assignedRole": { - "$ref": "#/definitions/LedgerUserRole", - "description": "The user's assigned role." - } - }, - "description": "The template for adding optional properties.", - "x-cadl-name": "Azure.Core.Foundations.ResourceCreateOrUpdateModel" + "$ref": "#/definitions/LedgerUserUpdate" } } ], @@ -459,48 +438,13 @@ "200": { "description": "The request has succeeded.", "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "The user id, either an AAD object ID or certificate fingerprint.", - "x-ms-skip-url-encoding": true, - "readOnly": true - }, - "assignedRole": { - "$ref": "#/definitions/LedgerUserRole", - "description": "The user's assigned role." - } - }, - "required": [ - "userId", - "assignedRole" - ], - "x-cadl-name": "Azure.Core.Foundations.ResourceOkResponse" + "$ref": "#/definitions/LedgerUser" } }, "201": { "description": "The request has succeeded and a new resource has been created as a result.", "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "The user id, either an AAD object ID or certificate fingerprint.", - "x-ms-skip-url-encoding": true, - "readOnly": true - }, - "assignedRole": { - "$ref": "#/definitions/LedgerUserRole", - "description": "The user's assigned role." - } - }, - "description": "A resource was successfully created.", - "required": [ - "userId", - "assignedRole" - ], - "x-cadl-name": "Azure.Core.Foundations.ResourceCreatedResponse" + "$ref": "#/definitions/LedgerUser" } }, "default": { @@ -672,6 +616,19 @@ "modelAsString": false } }, + "LedgerUserUpdate": { + "type": "object", + "properties": { + "assignedRole": { + "$ref": "#/definitions/LedgerUserRole", + "description": "The user's assigned role." + } + }, + "description": "Details about a Confidential ledger user.", + "required": [ + "assignedRole" + ] + }, "MyFlow": { "type": "object", "properties": { diff --git a/packages/cadl-rlc-test/test/confidentialLedger/cadl-output/review/confidential-ledger.api.md b/packages/cadl-rlc-test/test/confidentialLedger/cadl-output/review/confidential-ledger.api.md index a7982efe7f..c6b98806b6 100644 --- a/packages/cadl-rlc-test/test/confidentialLedger/cadl-output/review/confidential-ledger.api.md +++ b/packages/cadl-rlc-test/test/confidentialLedger/cadl-output/review/confidential-ledger.api.md @@ -48,8 +48,7 @@ export interface CreateLedgerEntry201Response extends HttpResponse { // @public (undocumented) export interface CreateLedgerEntryBodyParam { - // (undocumented) - body?: LedgerEntry; + body: LedgerEntry; } // @public (undocumented) @@ -61,18 +60,7 @@ export interface CreateLedgerEntryDefaultResponse extends HttpResponse { } // @public (undocumented) -export type CreateLedgerEntryParameters = CreateLedgerEntryQueryParam & CreateLedgerEntryBodyParam & RequestParameters; - -// @public (undocumented) -export interface CreateLedgerEntryQueryParam { - // (undocumented) - queryParameters?: CreateLedgerEntryQueryParamProperties; -} - -// @public (undocumented) -export interface CreateLedgerEntryQueryParamProperties { - collectionId?: string; -} +export type CreateLedgerEntryParameters = CreateLedgerEntryBodyParam & RequestParameters; // @public export interface CreateOrUpdateUser200Response extends HttpResponse { @@ -92,8 +80,7 @@ export interface CreateOrUpdateUser201Response extends HttpResponse { // @public (undocumented) export interface CreateOrUpdateUserBodyParam { - // (undocumented) - body?: LedgerUserResourceMergeAndPatch; + body: LedgerUserResourceMergeAndPatch; } // @public (undocumented) @@ -276,18 +263,7 @@ export interface GetLedgerEntryDefaultResponse extends HttpResponse { } // @public (undocumented) -export type GetLedgerEntryParameters = GetLedgerEntryQueryParam & RequestParameters; - -// @public (undocumented) -export interface GetLedgerEntryQueryParam { - // (undocumented) - queryParameters?: GetLedgerEntryQueryParamProperties; -} - -// @public (undocumented) -export interface GetLedgerEntryQueryParamProperties { - collectionId?: string; -} +export type GetLedgerEntryParameters = RequestParameters; // @public export type GetPage = (pageLink: string, maxPageSize?: number) => Promise<{ @@ -430,7 +406,7 @@ export interface LedgerUserOutput { readonly userId: string; } -// @public (undocumented) +// @public export type LedgerUserResourceMergeAndPatch = Partial; // @public (undocumented) @@ -460,7 +436,7 @@ export type ListCollectionsParameters = RequestParameters; // @public (undocumented) export interface ListLedgerEntries { get(options?: ListLedgerEntriesParameters): StreamableMethod; - post(options?: CreateLedgerEntryParameters): StreamableMethod; + post(options: CreateLedgerEntryParameters): StreamableMethod; } // @public diff --git a/packages/cadl-rlc-test/test/confidentialLedger/cadl-output/src/clientDefinitions.ts b/packages/cadl-rlc-test/test/confidentialLedger/cadl-output/src/clientDefinitions.ts index 21bcac5eb5..a4d4b931da 100644 --- a/packages/cadl-rlc-test/test/confidentialLedger/cadl-output/src/clientDefinitions.ts +++ b/packages/cadl-rlc-test/test/confidentialLedger/cadl-output/src/clientDefinitions.ts @@ -92,7 +92,7 @@ export interface ListLedgerEntries { >; /** A collection id may optionally be specified. */ post( - options?: CreateLedgerEntryParameters + options: CreateLedgerEntryParameters ): StreamableMethod< CreateLedgerEntry201Response | CreateLedgerEntryDefaultResponse >; diff --git a/packages/cadl-rlc-test/test/confidentialLedger/cadl-output/src/parameters.ts b/packages/cadl-rlc-test/test/confidentialLedger/cadl-output/src/parameters.ts index bb6383df3c..f8588cd20e 100644 --- a/packages/cadl-rlc-test/test/confidentialLedger/cadl-output/src/parameters.ts +++ b/packages/cadl-rlc-test/test/confidentialLedger/cadl-output/src/parameters.ts @@ -11,33 +11,13 @@ export type GetConsortiumMembersParameters = RequestParameters; export type ListLedgerEntriesParameters = RequestParameters; export interface CreateLedgerEntryBodyParam { - body?: LedgerEntry; + /** The resource instance. */ + body: LedgerEntry; } -export interface CreateLedgerEntryQueryParamProperties { - /** The collection id. */ - collectionId?: string; -} - -export interface CreateLedgerEntryQueryParam { - queryParameters?: CreateLedgerEntryQueryParamProperties; -} - -export type CreateLedgerEntryParameters = CreateLedgerEntryQueryParam & - CreateLedgerEntryBodyParam & - RequestParameters; - -export interface GetLedgerEntryQueryParamProperties { - /** The collection id. */ - collectionId?: string; -} - -export interface GetLedgerEntryQueryParam { - queryParameters?: GetLedgerEntryQueryParamProperties; -} - -export type GetLedgerEntryParameters = GetLedgerEntryQueryParam & +export type CreateLedgerEntryParameters = CreateLedgerEntryBodyParam & RequestParameters; +export type GetLedgerEntryParameters = RequestParameters; export type GetReceiptParameters = RequestParameters; export type GetTransactionStatusParameters = RequestParameters; @@ -54,10 +34,12 @@ export type GetCurrentLedgerEntryParameters = GetCurrentLedgerEntryQueryParam & RequestParameters; export type DeleteUserParameters = RequestParameters; export type GetUserParameters = RequestParameters; +/** The resource instance. */ export type LedgerUserResourceMergeAndPatch = Partial; export interface CreateOrUpdateUserBodyParam { - body?: LedgerUserResourceMergeAndPatch; + /** The resource instance. */ + body: LedgerUserResourceMergeAndPatch; } export interface CreateOrUpdateUserMediaTypesParam { diff --git a/packages/cadl-rlc-test/test/contoso/cadl-output/2022-11-01-preview/openapi.json b/packages/cadl-rlc-test/test/contoso/cadl-output/2022-11-01-preview/openapi.json index bdddc87fda..5b2ea034ff 100644 --- a/packages/cadl-rlc-test/test/contoso/cadl-output/2022-11-01-preview/openapi.json +++ b/packages/cadl-rlc-test/test/contoso/cadl-output/2022-11-01-preview/openapi.json @@ -25,18 +25,6 @@ "operationId": "Widgets_ListWidgets", "description": "List Widget resources", "parameters": [ - { - "$ref": "#/parameters/Azure.Core.TopQueryParameter" - }, - { - "$ref": "#/parameters/Azure.Core.SkipQueryParameter" - }, - { - "$ref": "#/parameters/Azure.Core.MaxPageSizeQueryParameter" - }, - { - "$ref": "#/parameters/Azure.Core.SelectQueryParameter" - }, { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" } @@ -67,7 +55,7 @@ "required": [ "value" ], - "x-cadl-name": "Azure.Core.Foundations.CustomPage" + "x-cadl-name": "Azure.Core.Foundations.CustomPage" } }, "default": { @@ -87,15 +75,15 @@ "operationId": "Widgets_GetWidget", "description": "Fetch a Widget by name.", "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, { "name": "widgetName", "in": "path", "required": true, "description": "The widget name.", "type": "string" - }, - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" } ], "responses": { @@ -117,6 +105,9 @@ "operationId": "Widgets_CreateOrUpdateWidget", "description": "Creates or updates a Widget asynchronously.", "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, { "name": "widgetName", "in": "path", @@ -125,25 +116,12 @@ "type": "string" }, { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "body", + "name": "resource", "in": "body", + "required": true, + "description": "The resource instance.", "schema": { - "type": "object", - "properties": { - "manufacturerId": { - "type": "string", - "description": "The ID of the widget's manufacturer." - }, - "sharedModel": { - "$ref": "#/definitions/FakedSharedModel", - "description": "The faked shared model." - } - }, - "description": "The template for adding optional properties.", - "x-cadl-name": "Azure.Core.Foundations.ResourceCreateOrUpdateModel" + "$ref": "#/definitions/WidgetUpdate" } } ], @@ -158,27 +136,7 @@ } }, "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The widget name.", - "readOnly": true - }, - "manufacturerId": { - "type": "string", - "description": "The ID of the widget's manufacturer." - }, - "sharedModel": { - "$ref": "#/definitions/FakedSharedModel", - "description": "The faked shared model." - } - }, - "required": [ - "name", - "manufacturerId" - ], - "x-cadl-name": "Azure.Core.Foundations.ResourceOkResponse" + "$ref": "#/definitions/Widget" } }, "201": { @@ -191,28 +149,7 @@ } }, "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The widget name.", - "readOnly": true - }, - "manufacturerId": { - "type": "string", - "description": "The ID of the widget's manufacturer." - }, - "sharedModel": { - "$ref": "#/definitions/FakedSharedModel", - "description": "The faked shared model." - } - }, - "description": "A resource was successfully created.", - "required": [ - "name", - "manufacturerId" - ], - "x-cadl-name": "Azure.Core.Foundations.ResourceCreatedResponse" + "$ref": "#/definitions/Widget" } }, "default": { @@ -230,15 +167,15 @@ "operationId": "Widgets_DeleteWidget", "description": "Delete a Widget asynchronously.", "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, { "name": "widgetName", "in": "path", "required": true, "description": "The widget name.", "type": "string" - }, - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" } ], "responses": { @@ -267,11 +204,12 @@ "description": "Error object that describes the error when status is \"Failed\"." } }, + "description": "Provides status details for long running operations.", "required": [ "id", "status" ], - "x-cadl-name": "Azure.Core.Foundations.AcceptedResponse" + "x-cadl-name": "Azure.Core.Foundations.OperationStatus" } }, "default": { @@ -288,6 +226,9 @@ "operationId": "Widgets_GetWidgetOperationStatus", "description": "Gets status of a Widget operation.", "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, { "name": "widgetName", "in": "path", @@ -301,9 +242,6 @@ "required": true, "description": "The unique ID of the operation.", "type": "string" - }, - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" } ], "responses": { @@ -450,6 +388,25 @@ "createdDate" ] }, + "FakedSharedModelUpdate": { + "type": "object", + "properties": { + "tag": { + "type": "string", + "description": "The tag." + }, + "createdDate": { + "type": "string", + "format": "date-time", + "description": "The created date." + } + }, + "description": "Faked shared model", + "required": [ + "tag", + "createdDate" + ] + }, "Versions": { "type": "string", "enum": [ @@ -488,6 +445,23 @@ "name", "manufacturerId" ] + }, + "WidgetUpdate": { + "type": "object", + "properties": { + "manufacturerId": { + "type": "string", + "description": "The ID of the widget's manufacturer." + }, + "sharedModel": { + "$ref": "#/definitions/FakedSharedModelUpdate", + "description": "The faked shared model." + } + }, + "description": "A widget.", + "required": [ + "manufacturerId" + ] } }, "parameters": { @@ -500,44 +474,6 @@ "minLength": 1, "type": "string", "x-ms-parameter-location": "method" - }, - "Azure.Core.MaxPageSizeQueryParameter": { - "name": "maxpagesize", - "in": "query", - "required": false, - "description": "The maximum number of result items per page.", - "type": "integer", - "format": "int32", - "x-ms-parameter-location": "method" - }, - "Azure.Core.SelectQueryParameter": { - "name": "select", - "in": "query", - "required": false, - "description": "Select the specified fields to be included in the response.", - "type": "array", - "items": { - "type": "string" - }, - "x-ms-parameter-location": "method" - }, - "Azure.Core.SkipQueryParameter": { - "name": "skip", - "in": "query", - "required": false, - "description": "The number of result items to skip.", - "type": "integer", - "format": "int32", - "x-ms-parameter-location": "method" - }, - "Azure.Core.TopQueryParameter": { - "name": "top", - "in": "query", - "required": false, - "description": "The number of result items to return.", - "type": "integer", - "format": "int32", - "x-ms-parameter-location": "method" } } } diff --git a/packages/cadl-rlc-test/test/contoso/cadl-output/review/contosowidgetmanager-rest.api.md b/packages/cadl-rlc-test/test/contoso/cadl-output/review/contosowidgetmanager-rest.api.md index f1843405ae..5768bc9c5f 100644 --- a/packages/cadl-rlc-test/test/contoso/cadl-output/review/contosowidgetmanager-rest.api.md +++ b/packages/cadl-rlc-test/test/contoso/cadl-output/review/contosowidgetmanager-rest.api.md @@ -57,8 +57,7 @@ export interface CreateOrUpdateWidget201Response extends HttpResponse { // @public (undocumented) export interface CreateOrUpdateWidgetBodyParam { - // (undocumented) - body?: WidgetResourceMergeAndPatch; + body: WidgetResourceMergeAndPatch; } // @public (undocumented) @@ -234,21 +233,7 @@ export interface ListWidgetsDefaultResponse extends HttpResponse { } // @public (undocumented) -export type ListWidgetsParameters = ListWidgetsQueryParam & RequestParameters; - -// @public (undocumented) -export interface ListWidgetsQueryParam { - // (undocumented) - queryParameters?: ListWidgetsQueryParamProperties; -} - -// @public (undocumented) -export interface ListWidgetsQueryParamProperties { - maxpagesize?: number; - select?: string[]; - skip?: number; - top?: number; -} +export type ListWidgetsParameters = RequestParameters; // @public export interface OperationStatusOutput { @@ -306,7 +291,7 @@ export interface WidgetOutput { sharedModel?: FakedSharedModelOutput; } -// @public (undocumented) +// @public export type WidgetResourceMergeAndPatch = Partial; // (No @packageDocumentation comment for this package) diff --git a/packages/cadl-rlc-test/test/contoso/cadl-output/src/parameters.ts b/packages/cadl-rlc-test/test/contoso/cadl-output/src/parameters.ts index 597470a01a..5614f4fbe5 100644 --- a/packages/cadl-rlc-test/test/contoso/cadl-output/src/parameters.ts +++ b/packages/cadl-rlc-test/test/contoso/cadl-output/src/parameters.ts @@ -6,10 +6,12 @@ import { Widget } from "./models"; export type GetWidgetParameters = RequestParameters; export type GetWidgetOperationStatusParameters = RequestParameters; +/** The resource instance. */ export type WidgetResourceMergeAndPatch = Partial; export interface CreateOrUpdateWidgetBodyParam { - body?: WidgetResourceMergeAndPatch; + /** The resource instance. */ + body: WidgetResourceMergeAndPatch; } export interface CreateOrUpdateWidgetMediaTypesParam { @@ -22,20 +24,4 @@ export type CreateOrUpdateWidgetParameters = CreateOrUpdateWidgetBodyParam & RequestParameters; export type DeleteWidgetParameters = RequestParameters; - -export interface ListWidgetsQueryParamProperties { - /** The number of result items to return. */ - top?: number; - /** The number of result items to skip. */ - skip?: number; - /** The maximum number of result items per page. */ - maxpagesize?: number; - /** Select the specified fields to be included in the response. */ - select?: string[]; -} - -export interface ListWidgetsQueryParam { - queryParameters?: ListWidgetsQueryParamProperties; -} - -export type ListWidgetsParameters = ListWidgetsQueryParam & RequestParameters; +export type ListWidgetsParameters = RequestParameters; diff --git a/packages/cadl-rlc-test/test/customWrapper/cadl-output/review/customWrapper.api.md b/packages/cadl-rlc-test/test/customWrapper/cadl-output/review/customWrapper.api.md index d5fe499b43..5dd31b32e2 100644 --- a/packages/cadl-rlc-test/test/customWrapper/cadl-output/review/customWrapper.api.md +++ b/packages/cadl-rlc-test/test/customWrapper/cadl-output/review/customWrapper.api.md @@ -20,7 +20,6 @@ export interface DeploymentCreationParameters { input: string | string[] | number[] | number[][]; input_type?: string; model?: string; - name: string; user?: string; } @@ -29,7 +28,7 @@ export interface DeploymentOutput { input: string | string[] | number[] | number[][]; input_type?: string; model?: string; - name: string; + readonly name: string; user?: string; } diff --git a/packages/cadl-rlc-test/test/customWrapper/cadl-output/src/models.ts b/packages/cadl-rlc-test/test/customWrapper/cadl-output/src/models.ts index d812542433..8385fe8899 100644 --- a/packages/cadl-rlc-test/test/customWrapper/cadl-output/src/models.ts +++ b/packages/cadl-rlc-test/test/customWrapper/cadl-output/src/models.ts @@ -3,8 +3,6 @@ /** Deployment resource creation parameters. */ export interface DeploymentCreationParameters { - /** The name of the deployment. */ - name: string; /** The ID of the end-user, for use in tracking and rate-limiting. */ user?: string; /** input type of embedding search to use */ diff --git a/packages/cadl-rlc-test/test/customWrapper/cadl-output/src/outputModels.ts b/packages/cadl-rlc-test/test/customWrapper/cadl-output/src/outputModels.ts index 400d986ec8..b267e4ef7d 100644 --- a/packages/cadl-rlc-test/test/customWrapper/cadl-output/src/outputModels.ts +++ b/packages/cadl-rlc-test/test/customWrapper/cadl-output/src/outputModels.ts @@ -4,7 +4,7 @@ /** The details of a project deployment. */ export interface DeploymentOutput { /** The name of the deployment. */ - name: string; + readonly name: string; /** The ID of the end-user, for use in tracking and rate-limiting. */ user?: string; /** input type of embedding search to use */ diff --git a/packages/cadl-rlc-test/test/customWrapper/spec/main.cadl b/packages/cadl-rlc-test/test/customWrapper/spec/main.cadl index 5e05d2a3ef..6c19b249ec 100644 --- a/packages/cadl-rlc-test/test/customWrapper/spec/main.cadl +++ b/packages/cadl-rlc-test/test/customWrapper/spec/main.cadl @@ -36,6 +36,7 @@ scalar Endpoint extends string; model Deployment { @doc("The name of the deployment.") @key("deploymentName") + @visibility("read") @segment("deployments") name: string; diff --git a/packages/cadl-rlc-test/test/multiclient/cadl-output/openapi.json b/packages/cadl-rlc-test/test/multiclient/cadl-output/openapi.json index de4b396117..b2544e4be0 100644 --- a/packages/cadl-rlc-test/test/multiclient/cadl-output/openapi.json +++ b/packages/cadl-rlc-test/test/multiclient/cadl-output/openapi.json @@ -54,7 +54,7 @@ "required": [ "value" ], - "x-cadl-name": "Azure.Core.Foundations.CustomPage" + "x-cadl-name": "Azure.Core.Foundations.CustomPage" } }, "default": { @@ -74,6 +74,9 @@ "operationId": "CadlCoreOp_CreateOrUpdate", "description": "Creates a new resource or updates an existing one.", "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, { "name": "name", "in": "path", @@ -81,26 +84,12 @@ "type": "string" }, { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "body", + "name": "resource", "in": "body", + "required": true, + "description": "The resource instance.", "schema": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "description": "The template for adding updateable properties.", - "required": [ - "type" - ], - "x-cadl-name": "Azure.Core.Foundations.ResourceCreateOrReplaceModel" + "$ref": "#/definitions/Resource" } } ], @@ -108,56 +97,13 @@ "200": { "description": "The request has succeeded.", "schema": { - "type": "object", - "properties": { - "id": { - "type": "string", - "readOnly": true - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "required": [ - "id", - "name", - "type" - ], - "x-cadl-name": "Azure.Core.Foundations.ResourceOkResponse" + "$ref": "#/definitions/Resource" } }, "201": { "description": "The request has succeeded and a new resource has been created as a result.", "schema": { - "type": "object", - "properties": { - "id": { - "type": "string", - "readOnly": true - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "description": "A resource was successfully created.", - "required": [ - "id", - "name", - "type" - ], - "x-cadl-name": "Azure.Core.Foundations.ResourceCreatedResponse" + "$ref": "#/definitions/Resource" } }, "default": { @@ -172,14 +118,14 @@ "operationId": "CadlCoreOp_Get", "description": "Gets the details of a resource.", "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, { "name": "name", "in": "path", "required": true, "type": "string" - }, - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" } ], "responses": { @@ -201,14 +147,14 @@ "operationId": "CadlCoreOp_Delete", "description": "Deletes a resource.", "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, { "name": "name", "in": "path", "required": true, "type": "string" - }, - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" } ], "responses": { diff --git a/packages/cadl-rlc-test/test/multiclient/cadl-output/review/multiclient.api.md b/packages/cadl-rlc-test/test/multiclient/cadl-output/review/multiclient.api.md index 361efd27c5..0a9f197927 100644 --- a/packages/cadl-rlc-test/test/multiclient/cadl-output/review/multiclient.api.md +++ b/packages/cadl-rlc-test/test/multiclient/cadl-output/review/multiclient.api.md @@ -61,7 +61,7 @@ function createClient_2(endpoint: string, options?: ClientOptions): ResponseClie interface CreateOrUpdate { delete(options?: DeleteParameters): StreamableMethod; get(options?: GetParameters): StreamableMethod; - put(options?: CreateOrUpdateParameters): StreamableMethod; + put(options: CreateOrUpdateParameters): StreamableMethod; } // @public @@ -82,8 +82,7 @@ interface CreateOrUpdate201Response extends HttpResponse { // @public (undocumented) interface CreateOrUpdateBodyParam { - // (undocumented) - body?: Resource; + body: Resource; } // @public (undocumented) diff --git a/packages/cadl-rlc-test/test/multiclient/cadl-output/src/core/clientDefinitions.ts b/packages/cadl-rlc-test/test/multiclient/cadl-output/src/core/clientDefinitions.ts index 2fadd9b023..0b0af2eadc 100644 --- a/packages/cadl-rlc-test/test/multiclient/cadl-output/src/core/clientDefinitions.ts +++ b/packages/cadl-rlc-test/test/multiclient/cadl-output/src/core/clientDefinitions.ts @@ -23,7 +23,7 @@ import { Client, StreamableMethod } from "@azure-rest/core-client"; export interface CreateOrUpdate { /** Creates a new resource or updates an existing one. */ put( - options?: CreateOrUpdateParameters + options: CreateOrUpdateParameters ): StreamableMethod< | CreateOrUpdate200Response | CreateOrUpdate201Response diff --git a/packages/cadl-rlc-test/test/multiclient/cadl-output/src/core/parameters.ts b/packages/cadl-rlc-test/test/multiclient/cadl-output/src/core/parameters.ts index 36de87bb2d..b7dea453e7 100644 --- a/packages/cadl-rlc-test/test/multiclient/cadl-output/src/core/parameters.ts +++ b/packages/cadl-rlc-test/test/multiclient/cadl-output/src/core/parameters.ts @@ -5,7 +5,8 @@ import { RequestParameters } from "@azure-rest/core-client"; import { Resource } from "./models"; export interface CreateOrUpdateBodyParam { - body?: Resource; + /** The resource instance. */ + body: Resource; } export type CreateOrUpdateParameters = CreateOrUpdateBodyParam & diff --git a/packages/cadl-rlc-test/test/openai/cadl-output/2022-06-01-preview/openapi.json b/packages/cadl-rlc-test/test/openai/cadl-output/2022-06-01-preview/openapi.json index ff3041f6af..3fb778432e 100644 --- a/packages/cadl-rlc-test/test/openai/cadl-output/2022-06-01-preview/openapi.json +++ b/packages/cadl-rlc-test/test/openai/cadl-output/2022-06-01-preview/openapi.json @@ -60,6 +60,9 @@ "operationId": "Completions", "description": "Return the completions for a given prompt.", "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, { "name": "deploymentId", "in": "path", @@ -67,9 +70,6 @@ "description": "deployment id of the deployed model", "type": "string" }, - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, { "name": "body", "in": "body", @@ -190,6 +190,9 @@ "operationId": "Embeddings", "description": "Return the embeddings for a given prompt.", "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, { "name": "deploymentId", "in": "path", @@ -204,9 +207,6 @@ "description": "The ID of the end-user, for use in tracking and rate-limiting.", "type": "string" }, - { - "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, { "name": "body", "in": "body", @@ -432,7 +432,8 @@ "properties": { "deploymentId": { "type": "string", - "description": "deployment id of the deployed model" + "description": "deployment id of the deployed model", + "readOnly": true } }, "description": "A specific deployment", diff --git a/packages/cadl-rlc-test/test/openai/cadl-output/review/openai.api.md b/packages/cadl-rlc-test/test/openai/cadl-output/review/openai.api.md index b6a676a69a..839c884205 100644 --- a/packages/cadl-rlc-test/test/openai/cadl-output/review/openai.api.md +++ b/packages/cadl-rlc-test/test/openai/cadl-output/review/openai.api.md @@ -102,6 +102,11 @@ export type CompletionsParameters = CompletionsBodyParam & RequestParameters; function createClient(endpoint: string, credentials: KeyCredential, options?: ClientOptions): AzureOpenAIApiClient; export default createClient; +// @public +export interface DeploymentOutput { + readonly deploymentId: string; +} + // @public (undocumented) export interface EmbeddingOutput { // (undocumented) diff --git a/packages/cadl-rlc-test/test/openai/cadl-output/src/outputModels.ts b/packages/cadl-rlc-test/test/openai/cadl-output/src/outputModels.ts index 18998837d2..aed7da8787 100644 --- a/packages/cadl-rlc-test/test/openai/cadl-output/src/outputModels.ts +++ b/packages/cadl-rlc-test/test/openai/cadl-output/src/outputModels.ts @@ -1,6 +1,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +/** A specific deployment */ +export interface DeploymentOutput { + /** deployment id of the deployed model */ + readonly deploymentId: string; +} + export interface EmbeddingsOutput { object: "list"; data: Array; diff --git a/packages/cadl-rlc-test/test/openai/spec/main.cadl b/packages/cadl-rlc-test/test/openai/spec/main.cadl index 898ed393b6..6aaa77b01d 100644 --- a/packages/cadl-rlc-test/test/openai/spec/main.cadl +++ b/packages/cadl-rlc-test/test/openai/spec/main.cadl @@ -45,6 +45,7 @@ enum ServiceApiVersions { @Cadl.Rest.resource("deployments") model Deployment { @doc("deployment id of the deployed model") + @visibility("read") @key deploymentId: string; } diff --git a/packages/cadl-rlc-test/test/parametrizedHost/cadl-output/openapi.json b/packages/cadl-rlc-test/test/parametrizedHost/cadl-output/openapi.json index b1f82493f2..f58d28f345 100644 --- a/packages/cadl-rlc-test/test/parametrizedHost/cadl-output/openapi.json +++ b/packages/cadl-rlc-test/test/parametrizedHost/cadl-output/openapi.json @@ -175,7 +175,8 @@ "type": "object", "properties": { "collectionId": { - "type": "string" + "type": "string", + "readOnly": true } }, "description": "Identifier for collections.", diff --git a/packages/cadl-rlc-test/test/parametrizedHost/cadl-output/review/parametrized-host.api.md b/packages/cadl-rlc-test/test/parametrizedHost/cadl-output/review/parametrized-host.api.md index b19fe7efbe..43a90ae36b 100644 --- a/packages/cadl-rlc-test/test/parametrizedHost/cadl-output/review/parametrized-host.api.md +++ b/packages/cadl-rlc-test/test/parametrizedHost/cadl-output/review/parametrized-host.api.md @@ -14,7 +14,7 @@ import { TokenCredential } from '@azure/core-auth'; // @public export interface CollectionOutput { // (undocumented) - collectionId: string; + readonly collectionId: string; } // @public diff --git a/packages/cadl-rlc-test/test/parametrizedHost/cadl-output/src/outputModels.ts b/packages/cadl-rlc-test/test/parametrizedHost/cadl-output/src/outputModels.ts index 9413bc93f4..15851ff0ee 100644 --- a/packages/cadl-rlc-test/test/parametrizedHost/cadl-output/src/outputModels.ts +++ b/packages/cadl-rlc-test/test/parametrizedHost/cadl-output/src/outputModels.ts @@ -3,7 +3,7 @@ /** Identifier for collections. */ export interface CollectionOutput { - collectionId: string; + readonly collectionId: string; } /** A response containing error details. */ diff --git a/packages/cadl-rlc-test/test/parametrizedHost/spec/main.cadl b/packages/cadl-rlc-test/test/parametrizedHost/spec/main.cadl index 09c082e38b..6a69d716aa 100644 --- a/packages/cadl-rlc-test/test/parametrizedHost/spec/main.cadl +++ b/packages/cadl-rlc-test/test/parametrizedHost/spec/main.cadl @@ -52,6 +52,7 @@ model MyFlow { @doc("Identifier for collections.") model Collection { @key + @visibility("read") collectionId: string; } diff --git a/packages/cadl-typescript/package.json b/packages/cadl-typescript/package.json index 578f28b8f0..09c7db5d49 100644 --- a/packages/cadl-typescript/package.json +++ b/packages/cadl-typescript/package.json @@ -40,11 +40,10 @@ "ts-node": "^10.7.0", "typescript": "~4.8.0", "prettier": "~2.7.1", - "@azure-tools/cadl-ranch-specs": "0.6.3", - "@cadl-lang/versioning": "0.38.0", - "@azure-tools/cadl-ranch-expect": "^0.1.13", - "@azure-tools/cadl-ranch": "0.2.12", - "@azure-tools/cadl-dpg": "0.24.0", + "@azure-tools/cadl-ranch-specs": "~0.6.6", + "@cadl-lang/versioning": "~0.39.0", + "@azure-tools/cadl-ranch-expect": "^0.1.15", + "@azure-tools/cadl-ranch": "~0.2.15", "chalk": "^4.0.0", "@azure-rest/core-client": "^1.0.0", "@azure/core-auth": "^1.3.2", @@ -54,14 +53,14 @@ "@azure/core-rest-pipeline": "^1.9.2" }, "dependencies": { - "@cadl-lang/compiler": "~0.38.5", - "@azure-tools/cadl-azure-core": "~0.24.0", - "@cadl-lang/rest": "0.38.0", + "@cadl-lang/compiler": "~0.39.0", + "@azure-tools/cadl-azure-core": "~0.25.0", + "@cadl-lang/rest": "~0.39.0", "prettier": "^2.6.1", "tslib": "^2.3.1", "@azure-tools/rlc-common": "1.0.0-beta.8", "ts-morph": "^15.1.0", - "@azure-tools/cadl-dpg": "0.24.0", + "@azure-tools/cadl-dpg": "~0.25.0", "fs-extra": "^11.1.0" }, "mocha": { diff --git a/packages/cadl-typescript/test/integration/generated/models/visibility/src/clientDefinitions.ts b/packages/cadl-typescript/test/integration/generated/models/visibility/src/clientDefinitions.ts index 8a5ebb12e3..caa624febf 100644 --- a/packages/cadl-typescript/test/integration/generated/models/visibility/src/clientDefinitions.ts +++ b/packages/cadl-typescript/test/integration/generated/models/visibility/src/clientDefinitions.ts @@ -31,8 +31,8 @@ export interface GetModel { } export interface Routes { - /** Resource for '/models/visibility' has methods for the following verbs: get, head, put, patch, post, delete */ - (path: "/models/visibility"): GetModel; + /** Resource for '/models/visibility/automatic' has methods for the following verbs: get, head, put, patch, post, delete */ + (path: "/models/visibility/automatic"): GetModel; } export type ModelsVisibilityAutomaticClient = Client & { diff --git a/packages/cadl-typescript/test/integration/generated/resiliency/devDriven/src/outputModels.ts b/packages/cadl-typescript/test/integration/generated/resiliency/devDriven/src/outputModels.ts index 454cf61ba5..5015f4fe80 100644 --- a/packages/cadl-typescript/test/integration/generated/resiliency/devDriven/src/outputModels.ts +++ b/packages/cadl-typescript/test/integration/generated/resiliency/devDriven/src/outputModels.ts @@ -4,7 +4,7 @@ /** Product resource */ export interface ProductOutput { /** key of product */ - key: string; + readonly key: string; /** * received mode * diff --git a/packages/cadl-typescript/test/unit/azureCoreOperationsGenerator.spec.ts b/packages/cadl-typescript/test/unit/azureCoreOperationsGenerator.spec.ts index fa03992356..c99946461e 100644 --- a/packages/cadl-typescript/test/unit/azureCoreOperationsGenerator.spec.ts +++ b/packages/cadl-typescript/test/unit/azureCoreOperationsGenerator.spec.ts @@ -19,6 +19,7 @@ async function compileResourceOperation(code: string) { #suppress "@azure-tools/cadl-azure-core/documentation-required" "for test" model TestModel { @key + @visibility("read") @segment("test") name: string; value: int32;