Skip to content

Commit

Permalink
CodeGen from PR 29440 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 02b541d35fc6862db3f7955cd6178b61635ba4f4 into 30c95a2a424a347f27ac78b6bdefd37f71314b7e
  • Loading branch information
SDKAuto committed Jun 14, 2024
1 parent 090184d commit 270dfb6
Show file tree
Hide file tree
Showing 28 changed files with 795 additions and 1,570 deletions.
6 changes: 3 additions & 3 deletions sdk/schemaregistry/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file.

trigger:
branches:
include:
Expand All @@ -9,18 +9,18 @@ trigger:
paths:
include:
- sdk/schemaregistry/

pr:
branches:
include:
- main
- feature/*
- release/*
- hotfix/*
exclude:
- feature/v4
paths:
include:
- sdk/schemaregistry/

extends:
template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml
parameters:
Expand Down
2 changes: 1 addition & 1 deletion sdk/schemaregistry/schema-registry/api-extractor.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@
}
}
}
}
}
2 changes: 1 addition & 1 deletion sdk/schemaregistry/schema-registry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,4 @@
"typescript": "~5.4.5",
"ts-node": "^10.0.0"
}
}
}
115 changes: 115 additions & 0 deletions sdk/schemaregistry/schema-registry/src/clientDefinitions.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

import {
ListSchemaGroupsParameters,
ListSchemaVersionsParameters,
GetSchemaByIdParameters,
GetSchemaByVersionParameters,
GetSchemaPropertiesByContentParameters,
RegisterSchemaParameters,
} from "./parameters.js";
import {
ListSchemaGroups200Response,
ListSchemaGroupsDefaultResponse,
ListSchemaVersions200Response,
ListSchemaVersionsDefaultResponse,
GetSchemaById200Response,
GetSchemaByIdDefaultResponse,
GetSchemaByVersion200Response,
GetSchemaByVersionDefaultResponse,
GetSchemaPropertiesByContent204Response,
GetSchemaPropertiesByContentDefaultResponse,
RegisterSchema204Response,
RegisterSchemaDefaultResponse,
} from "./responses.js";
import { Client, StreamableMethod } from "@azure-rest/core-client";

export interface ListSchemaGroups {
/** Gets the list of schema groups user is authorized to access. */
get(
options?: ListSchemaGroupsParameters,
): StreamableMethod<
ListSchemaGroups200Response | ListSchemaGroupsDefaultResponse
>;
}

export interface ListSchemaVersions {
/** Gets the list of all versions of one schema. */
get(
options?: ListSchemaVersionsParameters,
): StreamableMethod<
ListSchemaVersions200Response | ListSchemaVersionsDefaultResponse
>;
}

export interface GetSchemaById {
/** Gets a registered schema by its unique ID. Azure Schema Registry guarantees that ID is unique within a namespace. Operation response type is based on serialization of schema requested. */
get(
options?: GetSchemaByIdParameters,
): StreamableMethod<GetSchemaById200Response | GetSchemaByIdDefaultResponse>;
}

export interface GetSchemaByVersion {
/** Gets one specific version of one schema. */
get(
options?: GetSchemaByVersionParameters,
): StreamableMethod<
GetSchemaByVersion200Response | GetSchemaByVersionDefaultResponse
>;
}

export interface GetSchemaPropertiesByContent {
/** Gets the properties referencing an existing schema within the specified schema group, as matched by schema content comparison. */
post(
options: GetSchemaPropertiesByContentParameters,
): StreamableMethod<
| GetSchemaPropertiesByContent204Response
| GetSchemaPropertiesByContentDefaultResponse
>;
}

export interface RegisterSchema {
/** Register new schema. If schema of specified name does not exist in specified group, schema is created at version 1. If schema of specified name exists already in specified group, schema is created at latest version + 1. */
put(
options: RegisterSchemaParameters,
): StreamableMethod<
RegisterSchema204Response | RegisterSchemaDefaultResponse
>;
}

export interface Routes {
/** Resource for '/$schemaGroups' has methods for the following verbs: get */
(path: "/$schemaGroups"): ListSchemaGroups;
/** Resource for '/$schemaGroups/\{groupName\}/schemas/\{schemaName\}/versions' has methods for the following verbs: get */
(
path: "/$schemaGroups/{groupName}/schemas/{schemaName}/versions",
groupName: string,
schemaName: string,
): ListSchemaVersions;
/** Resource for '/$schemaGroups/$schemas/\{id\}' has methods for the following verbs: get */
(path: "/$schemaGroups/$schemas/{id}", id: string): GetSchemaById;
/** Resource for '/$schemaGroups/\{groupName\}/schemas/\{schemaName\}/versions/\{schemaVersion\}' has methods for the following verbs: get */
(
path: "/$schemaGroups/{groupName}/schemas/{schemaName}/versions/{schemaVersion}",
groupName: string,
schemaName: string,
schemaVersion: number,
): GetSchemaByVersion;
/** Resource for '/$schemaGroups/\{groupName\}/schemas/\{schemaName\}:get-id' has methods for the following verbs: post */
(
path: "/$schemaGroups/{groupName}/schemas/{schemaName}:get-id",
groupName: string,
schemaName: string,
): GetSchemaPropertiesByContent;
/** Resource for '/$schemaGroups/\{groupName\}/schemas/\{schemaName\}' has methods for the following verbs: put */
(
path: "/$schemaGroups/{groupName}/schemas/{schemaName}",
groupName: string,
schemaName: string,
): RegisterSchema;
}

export type SchemaRegistryClient = Client & {
path: Routes;
};
12 changes: 0 additions & 12 deletions sdk/schemaregistry/schema-registry/src/constants.ts

This file was deleted.

88 changes: 0 additions & 88 deletions sdk/schemaregistry/schema-registry/src/conversions.ts

This file was deleted.

This file was deleted.

11 changes: 0 additions & 11 deletions sdk/schemaregistry/schema-registry/src/generated/index.ts

This file was deleted.

Loading

0 comments on commit 270dfb6

Please sign in to comment.