Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump core from 8b062e3 to 717af64 (Apply deprecated service.version changes) #337

Merged
merged 14 commits into from
Feb 29, 2024
5 changes: 0 additions & 5 deletions .changeset/twelve-dingos-ring.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
changeKind: internal
packages:
- "@azure-tools/typespec-azure-resource-manager"
- "@azure-tools/typespec-client-generator-core"
---

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
changeKind: feature
packages:
- "@azure-tools/typespec-autorest"
---

Add support for all properties of openapi `info` object on the `@info` decorator
2 changes: 1 addition & 1 deletion core
Submodule core updated 60 files
+8 −0 .chronus/changes/deprecate-service-version-2024-1-9-17-27-47.md
+9 −0 .chronus/changes/deprecate-service-version-2024-1-9-17-40-35.md
+6 −0 .chronus/changes/deprecate-service-version-2024-1-9-19-36-46.md
+8 −0 .chronus/changes/fix-comment-only-2024-1-26-16-20-24.md
+8 −0 .chronus/changes/fix-shared-route-verb-2024-1-23-18-18-26.md
+8 −0 .chronus/changes/validate-useauth-unique-2024-1-27-17-26-52.md
+11 −2 packages/compiler/src/formatter/print/comment-handler.ts
+11 −3 packages/compiler/src/lib/service.ts
+8 −2 packages/compiler/test/decorators/service.test.ts
+16 −0 packages/compiler/test/formatter/formatter.test.ts
+1 −0 packages/http/src/decorators.ts
+1 −1 packages/http/src/lib.ts
+47 −12 packages/http/src/validate.ts
+19 −2 packages/http/test/http-decorators.test.ts
+9 −0 packages/openapi/lib/decorators.tsp
+28 −1 packages/openapi/src/decorators.ts
+12 −0 packages/openapi/src/types.ts
+39 −1 packages/openapi/test/decorators.test.ts
+5 −5 packages/openapi3/src/openapi.ts
+5 −2 packages/openapi3/test/info.test.ts
+2 −2 packages/openapi3/test/output-file.test.ts
+0 −1 packages/samples/specs/multiple-types-union/main.tsp
+0 −1 packages/samples/specs/petstore/petstore.tsp
+0 −1 packages/samples/specs/rest/petstore/petstore.tsp
+1 −1 packages/samples/test/output/authentication/@typespec/openapi3/openapi.TypeSpec.InterfaceAuth.yaml
+1 −1 packages/samples/test/output/authentication/@typespec/openapi3/openapi.TypeSpec.OperationAuth.yaml
+1 −1 packages/samples/test/output/authentication/@typespec/openapi3/openapi.TypeSpec.ServiceAuth.yaml
+1 −1 packages/samples/test/output/binary/@typespec/openapi3/openapi.yaml
+1 −1 packages/samples/test/output/documentation/@typespec/openapi3/openapi.yaml
+1 −1 packages/samples/test/output/encoded-names/@typespec/openapi3/openapi.yaml
+1 −1 packages/samples/test/output/encoding/@typespec/openapi3/openapi.yaml
+1 −1 packages/samples/test/output/grpc-kiosk-example/@typespec/openapi3/openapi.yaml
+1 −1 packages/samples/test/output/grpc-library-example/@typespec/openapi3/openapi.yaml
+1 −1 packages/samples/test/output/multipart/@typespec/openapi3/openapi.yaml
+1 −1 packages/samples/test/output/multiple-types-union/@typespec/openapi3/openapi.yaml
+1 −1 packages/samples/test/output/nested/@typespec/openapi3/openapi.yaml
+1 −1 packages/samples/test/output/nullable/@typespec/openapi3/openapi.yaml
+1 −1 packages/samples/test/output/openapi-extensions/@typespec/openapi3/openapi.yaml
+1 −1 packages/samples/test/output/optional/@typespec/openapi3/openapi.yaml
+1 −1 packages/samples/test/output/param-decorators/@typespec/openapi3/openapi.yaml
+1 −1 packages/samples/test/output/petstore/@typespec/openapi3/openapi.yaml
+1 −1 packages/samples/test/output/polymorphism/@typespec/openapi3/openapi.yaml
+1 −1 packages/samples/test/output/rest/petstore/@typespec/openapi3/openapi.yaml
+1 −1 packages/samples/test/output/signatures/@typespec/openapi3/openapi.yaml
+1 −1 packages/samples/test/output/simple/@typespec/openapi3/openapi.yaml
+1 −1 packages/samples/test/output/status-code-ranges/@typespec/openapi3/openapi.yaml
+1 −1 packages/samples/test/output/string-template/@typespec/openapi3/openapi.yaml
+1 −1 packages/samples/test/output/tags/@typespec/openapi3/openapi.yaml
+1 −1 packages/samples/test/output/testserver/body-boolean/@typespec/openapi3/openapi.yaml
+1 −1 packages/samples/test/output/testserver/body-complex/@typespec/openapi3/openapi.yaml
+1 −1 packages/samples/test/output/testserver/body-string/@typespec/openapi3/openapi.yaml
+1 −1 packages/samples/test/output/testserver/body-time/@typespec/openapi3/openapi.yaml
+1 −1 packages/samples/test/output/testserver/media-types/@typespec/openapi3/openapi.yaml
+1 −1 packages/samples/test/output/testserver/multiple-inheritance/@typespec/openapi3/openapi.yaml
+1 −1 packages/samples/test/output/use-versioned-lib/@typespec/openapi3/openapi.yaml
+1 −1 packages/samples/test/output/visibility/@typespec/openapi3/openapi.yaml
+2 −0 packages/versioning/src/validate.ts
+1 −0 packages/versioning/test/incompatible-versioning.test.ts
+1 −1 packages/website/static/tsp-samples/homepage/hero/http/out/openapi.yaml
+1 −1 packages/website/static/tsp-samples/openapi3/hero/out/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ using TypeSpec.OpenAPI;
)
@service({
title: "Confidential Ledger Service",
version: "2022-05-13",
})
@useDependency(Azure.Core.Versions.v1_0_Preview_2)
@server(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ using Azure.Core;
@useAuth(AadOauth2Auth<["https://cognitiveservices.azure.com/.default"]>)
@service({
title: "Form Recognizer",
version: "2021-09-30-preview",
})
@useDependency(Azure.Core.Versions.v1_0_Preview_1)
@doc("Extracts content, layout, and structured data from documents.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ using Azure.Core.Traits;
)
@service({
title: "Microsoft Cognitive Language Service - Analyze Text Authoring",
version: "202ß2-05-15-preview",
})
@useDependency(Azure.Core.Versions.v1_0_Preview_2)
@route("/authoring/analyze-text/")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import "./questionanswering-authoring_models.tsp";
)
@service({
title: "Hello world",
version: "0.1.0",
})
namespace Azure.Language.QnA; //@route("") // TODO

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ using TypeSpec.OpenAPI;
)
@service({
title: "Microsoft Cognitive Language Service - Question Answering - Authoring",
version: "21-10-01",
})
@useDependency(Azure.Core.Versions.v1_0_Preview_2)
namespace Azure.QnAMaker;
Expand Down
1 change: 0 additions & 1 deletion packages/samples/specs/data-plane/searchindex/main.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import "@azure-tools/typespec-azure-core";
)
@service({
title: "SearchIndexClient",
version: "2021-04-30-Preview",
})
namespace Azure.SearchIndex;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import "./searchservice.models.tsp";
)
@service({
title: "Search Service",
version: "2021-04-30-Preview",
})
namespace Azure.SearchService;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ using Azure.ResourceManager;

@service({
title: "Microsoft.EnvelopeTest",
})
@OpenAPI.info({
version: "2021-09-21-preview",
})
@useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ using TypeSpec.Versioning;
@armProviderNamespace
@service({
title: "CodeSigningManagementClient",
})
@OpenAPI.info({
version: "2020-12-14-preview",
})
@useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1)
Expand Down
2 changes: 2 additions & 0 deletions packages/samples/specs/resource-manager/contoso/contoso.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ using Azure.ResourceManager;
@armProviderNamespace
@service({
title: "ContosoProviderHubClient",
})
@OpenAPI.info({
version: "2021-10-01-preview",
})
@useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ using Azure.ResourceManager;
@armProviderNamespace
@service({
title: "Microsoft.CSharpAttributeTest",
})
@OpenAPI.info({
version: "2021-09-21-preview",
})
@useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ using Azure.Core;
@armProviderNamespace("Contoso.CustomerManagedKeyExample")
@service({
title: "Contoso.CustomerManagedKeyExample",
})
@OpenAPI.info({
version: "2023-03-01-preview",
})
@doc("An example of using the Customer Managed Key Encryption properties in a resource type.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ using Microsoft.DiscriminatorTest.Common;
@armProviderNamespace
@service({
title: "DiscriminatorTest",
})
@OpenAPI.info({
version: "2021-10-01-preview",
})
@useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ using Azure.ResourceManager;

@service({
title: "Microsoft.EnvelopeTest",
})
@OpenAPI.info({
version: "2021-09-21-preview",
})
@useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ using Autorest;
@armProviderNamespace
@service({
title: "Microsoft.Confluent",
})
@OpenAPI.info({
version: "2021-03-01-preview",
})
@useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ using Azure.ResourceManager;
@armProviderNamespace
@service({
title: "Azure Fluid Relay",
})
@OpenAPI.info({
version: "2021-03-12-preview",
})
@useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ using Azure.ResourceManager;
@armProviderNamespace
@service({
title: "Azure PlayFab",
})
@OpenAPI.info({
version: "2021-06-15-preview",
})
@useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1)
Expand Down
2 changes: 2 additions & 0 deletions packages/samples/specs/resource-manager/logz/logz.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ using Azure.ResourceManager;
@armProviderNamespace
@service({
title: "Microsoft.Logz",
})
@OpenAPI.info({
version: "2020-10-01-preview",
})
@useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1, Azure.Core.Versions.v1_0_Preview_2)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ using Azure.ResourceManager;

@service({
title: "Microsoft.OperationsTest",
})
@OpenAPI.info({
version: "2022-11-01-preview",
})
@useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ using Azure.ResourceManager;
@armProviderNamespace
@service({
title: "Microsoft.ServiceLinker provider",
})
@OpenAPI.info({
version: "2021-01-01-privatepreview",
})
@useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ using Azure.Core;
@armProviderNamespace("Microsoft.UpdateTests")
@service({
title: "Microsoft.UpdateTests",
})
@OpenAPI.info({
version: "2023-03-01-preview",
})
@doc("Testing resource update using a Management API")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import "@typespec/http";
import "@typespec/rest";
import "@typespec/versioning";
import "@azure-tools/typespec-azure-resource-manager";
import "@typespec/openapi";

using TypeSpec.Rest;
using TypeSpec.Http;
Expand All @@ -11,9 +12,11 @@ using Azure.ResourceManager;
@armProviderNamespace
@service({
title: "Microsoft.Contoso",
version: "2022-05-22-preview",
})
@useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1)
@OpenAPI.info({
version: "2022-05-22-preview",
})
namespace Microsoft.Contoso;

interface Operations extends Azure.ResourceManager.Operations {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"swagger": "2.0",
"info": {
"title": "Confidential Ledger Service",
"version": "2022-05-13",
"version": "0000-00-00",
"x-typespec-generated": [
{
"emitter": "@azure-tools/typespec-autorest"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
openapi: 3.0.0
info:
title: Confidential Ledger Service
version: 2022-05-13
version: 0.0.0
tags: []
paths:
/app/collections:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"swagger": "2.0",
"info": {
"title": "Form Recognizer",
"version": "2021-09-30-preview",
"version": "0000-00-00",
"description": "Extracts content, layout, and structured data from documents.",
"x-typespec-generated": [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
openapi: 3.0.0
info:
title: Form Recognizer
version: 2021-09-30-preview
description: Extracts content, layout, and structured data from documents.
version: 0.0.0
tags:
- name: Management
- name: Analysis
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"swagger": "2.0",
"info": {
"title": "Microsoft Cognitive Language Service - Analyze Text Authoring",
"version": "202ß2-05-15-preview",
"version": "0000-00-00",
"x-typespec-generated": [
{
"emitter": "@azure-tools/typespec-autorest"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
openapi: 3.0.0
info:
title: Microsoft Cognitive Language Service - Analyze Text Authoring
version: 202ß2-05-15-preview
version: 0.0.0
tags: []
paths:
/authoring/analyze-text/projects:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"swagger": "2.0",
"info": {
"title": "Hello world",
"version": "0.1.0",
"version": "0000-00-00",
"x-typespec-generated": [
{
"emitter": "@azure-tools/typespec-autorest"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
openapi: 3.0.0
info:
title: Hello world
version: 0.1.0
version: 0.0.0
tags: []
paths:
/feedback/{projectName}:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"swagger": "2.0",
"info": {
"title": "Microsoft Cognitive Language Service - Question Answering - Authoring",
"version": "21-10-01",
"version": "0000-00-00",
"x-typespec-generated": [
{
"emitter": "@azure-tools/typespec-autorest"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
openapi: 3.0.0
info:
title: Microsoft Cognitive Language Service - Question Answering - Authoring
version: 21-10-01
version: 0.0.0
tags: []
paths:
/query-knowledgebases/projects:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"swagger": "2.0",
"info": {
"title": "SearchIndexClient",
"version": "2021-04-30-Preview",
"version": "0000-00-00",
"x-typespec-generated": [
{
"emitter": "@azure-tools/typespec-autorest"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
openapi: 3.0.0
info:
title: SearchIndexClient
version: 2021-04-30-Preview
version: 0.0.0
tags:
- name: Documents
paths:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"swagger": "2.0",
"info": {
"title": "Search Service",
"version": "2021-04-30-Preview",
"version": "0000-00-00",
"description": "Client that can be used to manage and query indexes and documents, as well as manage other resources, on a search service.",
"x-typespec-generated": [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
openapi: 3.0.0
info:
title: Search Service
version: 2021-04-30-Preview
description: Client that can be used to manage and query indexes and documents, as well as manage other resources, on a search service.
version: 0.0.0
tags:
- name: DataSources
- name: Service
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
openapi: 3.0.0
info:
title: App Config Service
version: 0000-00-00
version: 0.0.0
tags: []
paths:
/keys:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"swagger": "2.0",
"info": {
"title": "Pet Store Service",
"version": "2021-03-25",
"version": "0000-00-00",
"description": "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.",
"x-typespec-generated": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"swagger": "2.0",
"info": {
"title": "Pet Store Service",
"version": "2021-03-25",
"version": "0000-00-00",
"x-typespec-generated": [
{
"emitter": "@azure-tools/typespec-autorest"
Expand Down
Loading
Loading