Skip to content

Commit

Permalink
fix-body-parameter-required (#2731)
Browse files Browse the repository at this point in the history
* fix-body-parameter-required

* fix ci

* update

* update test case

* fix ci

* refine the body required logic

* bug fix

* fix smoke test

* fix ci

* update test case

* update test case

* resolve comments

---------

Co-authored-by: Jiao Di (MSFT) <80496810+v-jiaodi@users.noreply.github.com>
  • Loading branch information
qiaozha and v-jiaodi authored Aug 21, 2024
1 parent 8c02412 commit a68a6bf
Show file tree
Hide file tree
Showing 27 changed files with 342 additions and 330 deletions.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
export type GetOperationResultParameters = RequestParameters;

export interface DetectFromUrlBodyParam {
body?: { url: string };
body: { url: string };
}

export interface DetectFromUrlQueryParamProperties {
Expand Down Expand Up @@ -109,7 +109,7 @@ export type DetectParameters = DetectQueryParam &
RequestParameters;

export interface FindSimilarBodyParam {
body?: {
body: {
faceId: string;
maxNumOfCandidatesReturned?: number;
mode?: FindSimilarMatchMode;
Expand All @@ -120,7 +120,7 @@ export interface FindSimilarBodyParam {
export type FindSimilarParameters = FindSimilarBodyParam & RequestParameters;

export interface FindSimilarFromFaceListBodyParam {
body?: {
body: {
faceId: string;
maxNumOfCandidatesReturned?: number;
mode?: FindSimilarMatchMode;
Expand All @@ -132,7 +132,7 @@ export type FindSimilarFromFaceListParameters =
FindSimilarFromFaceListBodyParam & RequestParameters;

export interface FindSimilarFromLargeFaceListBodyParam {
body?: {
body: {
faceId: string;
maxNumOfCandidatesReturned?: number;
mode?: FindSimilarMatchMode;
Expand All @@ -144,7 +144,7 @@ export type FindSimilarFromLargeFaceListParameters =
FindSimilarFromLargeFaceListBodyParam & RequestParameters;

export interface IdentifyFromPersonGroupBodyParam {
body?: {
body: {
faceIds: string[];
personGroupId: string;
maxNumOfCandidatesReturned?: number;
Expand All @@ -156,7 +156,7 @@ export type IdentifyFromPersonGroupParameters =
IdentifyFromPersonGroupBodyParam & RequestParameters;

export interface IdentifyFromLargePersonGroupBodyParam {
body?: {
body: {
faceIds: string[];
largePersonGroupId: string;
maxNumOfCandidatesReturned?: number;
Expand All @@ -168,7 +168,7 @@ export type IdentifyFromLargePersonGroupParameters =
IdentifyFromLargePersonGroupBodyParam & RequestParameters;

export interface IdentifyFromPersonDirectoryBodyParam {
body?: {
body: {
faceIds: string[];
personIds: string[];
maxNumOfCandidatesReturned?: number;
Expand All @@ -180,7 +180,7 @@ export type IdentifyFromPersonDirectoryParameters =
IdentifyFromPersonDirectoryBodyParam & RequestParameters;

export interface IdentifyFromDynamicPersonGroupBodyParam {
body?: {
body: {
faceIds: string[];
dynamicPersonGroupId: string;
maxNumOfCandidatesReturned?: number;
Expand All @@ -192,41 +192,41 @@ export type IdentifyFromDynamicPersonGroupParameters =
IdentifyFromDynamicPersonGroupBodyParam & RequestParameters;

export interface VerifyFaceToFaceBodyParam {
body?: { faceId1: string; faceId2: string };
body: { faceId1: string; faceId2: string };
}

export type VerifyFaceToFaceParameters = VerifyFaceToFaceBodyParam &
RequestParameters;

export interface VerifyFromPersonGroupBodyParam {
body?: { faceId: string; personGroupId: string; personId: string };
body: { faceId: string; personGroupId: string; personId: string };
}

export type VerifyFromPersonGroupParameters = VerifyFromPersonGroupBodyParam &
RequestParameters;

export interface VerifyFromLargePersonGroupBodyParam {
body?: { faceId: string; largePersonGroupId: string; personId: string };
body: { faceId: string; largePersonGroupId: string; personId: string };
}

export type VerifyFromLargePersonGroupParameters =
VerifyFromLargePersonGroupBodyParam & RequestParameters;

export interface VerifyFromPersonDirectoryBodyParam {
body?: { faceId: string; personId: string };
body: { faceId: string; personId: string };
}

export type VerifyFromPersonDirectoryParameters =
VerifyFromPersonDirectoryBodyParam & RequestParameters;

export interface GroupBodyParam {
body?: { faceIds: string[] };
body: { faceIds: string[] };
}

export type GroupParameters = GroupBodyParam & RequestParameters;

export interface CreateFaceListBodyParam {
body?: {
body: {
name: string;
userData?: string;
recognitionModel?: RecognitionModel;
Expand All @@ -249,7 +249,7 @@ export interface GetFaceListQueryParam {
export type GetFaceListParameters = GetFaceListQueryParam & RequestParameters;

export interface UpdateFaceListBodyParam {
body?: { name?: string; userData?: string };
body: { name?: string; userData?: string };
}

export type UpdateFaceListParameters = UpdateFaceListBodyParam &
Expand All @@ -267,7 +267,7 @@ export interface GetFaceListsQueryParam {
export type GetFaceListsParameters = GetFaceListsQueryParam & RequestParameters;

export interface AddFaceListFaceFromUrlBodyParam {
body?: { url: string };
body: { url: string };
}

export interface AddFaceListFaceFromUrlQueryParamProperties {
Expand Down Expand Up @@ -334,7 +334,7 @@ export type AddFaceListFaceParameters = AddFaceListFaceQueryParam &
export type DeleteFaceListFaceParameters = RequestParameters;

export interface CreateLargeFaceListBodyParam {
body?: {
body: {
name: string;
userData?: string;
recognitionModel?: RecognitionModel;
Expand All @@ -358,7 +358,7 @@ export type GetLargeFaceListParameters = GetLargeFaceListQueryParam &
RequestParameters;

export interface UpdateLargeFaceListBodyParam {
body?: { name?: string; userData?: string };
body: { name?: string; userData?: string };
}

export type UpdateLargeFaceListParameters = UpdateLargeFaceListBodyParam &
Expand All @@ -383,7 +383,7 @@ export type GetLargeFaceListTrainingStatusParameters = RequestParameters;
export type TrainLargeFaceListParameters = RequestParameters;

export interface AddLargeFaceListFaceFromUrlBodyParam {
body?: { url: string };
body: { url: string };
}

export interface AddLargeFaceListFaceFromUrlQueryParamProperties {
Expand Down Expand Up @@ -451,7 +451,7 @@ export type DeleteLargeFaceListFaceParameters = RequestParameters;
export type GetLargeFaceListFaceParameters = RequestParameters;

export interface UpdateLargeFaceListFaceBodyParam {
body?: { userData?: string };
body: { userData?: string };
}

export type UpdateLargeFaceListFaceParameters =
Expand All @@ -472,7 +472,7 @@ export type GetLargeFaceListFacesParameters = GetLargeFaceListFacesQueryParam &
RequestParameters;

export interface CreatePersonGroupBodyParam {
body?: {
body: {
name: string;
userData?: string;
recognitionModel?: RecognitionModel;
Expand All @@ -496,7 +496,7 @@ export type GetPersonGroupParameters = GetPersonGroupQueryParam &
RequestParameters;

export interface UpdatePersonGroupBodyParam {
body?: { name?: string; userData?: string };
body: { name?: string; userData?: string };
}

export type UpdatePersonGroupParameters = UpdatePersonGroupBodyParam &
Expand All @@ -521,7 +521,7 @@ export type GetPersonGroupTrainingStatusParameters = RequestParameters;
export type TrainPersonGroupParameters = RequestParameters;

export interface CreatePersonGroupPersonBodyParam {
body?: { name: string; userData?: string };
body: { name: string; userData?: string };
}

export type CreatePersonGroupPersonParameters =
Expand All @@ -530,7 +530,7 @@ export type DeletePersonGroupPersonParameters = RequestParameters;
export type GetPersonGroupPersonParameters = RequestParameters;

export interface UpdatePersonGroupPersonBodyParam {
body?: { name?: string; userData?: string };
body: { name?: string; userData?: string };
}

export type UpdatePersonGroupPersonParameters =
Expand All @@ -551,7 +551,7 @@ export type GetPersonGroupPersonsParameters = GetPersonGroupPersonsQueryParam &
RequestParameters;

export interface AddPersonGroupPersonFaceFromUrlBodyParam {
body?: { url: string };
body: { url: string };
}

export interface AddPersonGroupPersonFaceFromUrlQueryParamProperties {
Expand Down Expand Up @@ -620,14 +620,14 @@ export type DeletePersonGroupPersonFaceParameters = RequestParameters;
export type GetPersonGroupPersonFaceParameters = RequestParameters;

export interface UpdatePersonGroupPersonFaceBodyParam {
body?: { userData?: string };
body: { userData?: string };
}

export type UpdatePersonGroupPersonFaceParameters =
UpdatePersonGroupPersonFaceBodyParam & RequestParameters;

export interface CreateLargePersonGroupBodyParam {
body?: {
body: {
name: string;
userData?: string;
recognitionModel?: RecognitionModel;
Expand All @@ -651,7 +651,7 @@ export type GetLargePersonGroupParameters = GetLargePersonGroupQueryParam &
RequestParameters;

export interface UpdateLargePersonGroupBodyParam {
body?: { name?: string; userData?: string };
body: { name?: string; userData?: string };
}

export type UpdateLargePersonGroupParameters = UpdateLargePersonGroupBodyParam &
Expand All @@ -676,7 +676,7 @@ export type GetLargePersonGroupTrainingStatusParameters = RequestParameters;
export type TrainLargePersonGroupParameters = RequestParameters;

export interface CreateLargePersonGroupPersonBodyParam {
body?: { name: string; userData?: string };
body: { name: string; userData?: string };
}

export type CreateLargePersonGroupPersonParameters =
Expand All @@ -685,7 +685,7 @@ export type DeleteLargePersonGroupPersonParameters = RequestParameters;
export type GetLargePersonGroupPersonParameters = RequestParameters;

export interface UpdateLargePersonGroupPersonBodyParam {
body?: { name?: string; userData?: string };
body: { name?: string; userData?: string };
}

export type UpdateLargePersonGroupPersonParameters =
Expand All @@ -706,7 +706,7 @@ export type GetLargePersonGroupPersonsParameters =
GetLargePersonGroupPersonsQueryParam & RequestParameters;

export interface AddLargePersonGroupPersonFaceFromUrlBodyParam {
body?: { url: string };
body: { url: string };
}

export interface AddLargePersonGroupPersonFaceFromUrlQueryParamProperties {
Expand Down Expand Up @@ -775,22 +775,22 @@ export type DeleteLargePersonGroupPersonFaceParameters = RequestParameters;
export type GetLargePersonGroupPersonFaceParameters = RequestParameters;

export interface UpdateLargePersonGroupPersonFaceBodyParam {
body?: { userData?: string };
body: { userData?: string };
}

export type UpdateLargePersonGroupPersonFaceParameters =
UpdateLargePersonGroupPersonFaceBodyParam & RequestParameters;

export interface CreatePersonBodyParam {
body?: { name: string; userData?: string };
body: { name: string; userData?: string };
}

export type CreatePersonParameters = CreatePersonBodyParam & RequestParameters;
export type DeletePersonParameters = RequestParameters;
export type GetPersonParameters = RequestParameters;

export interface UpdatePersonBodyParam {
body?: { name?: string; userData?: string };
body: { name?: string; userData?: string };
}

export type UpdatePersonParameters = UpdatePersonBodyParam & RequestParameters;
Expand Down Expand Up @@ -863,7 +863,7 @@ export type AddPersonFaceParameters = AddPersonFaceQueryParam &
RequestParameters;

export interface AddPersonFaceFromUrlBodyParam {
body?: { url: string };
body: { url: string };
}

export interface AddPersonFaceFromUrlQueryParamProperties {
Expand All @@ -890,22 +890,22 @@ export type DeletePersonFaceParameters = RequestParameters;
export type GetPersonFaceParameters = RequestParameters;

export interface UpdatePersonFaceBodyParam {
body?: { userData?: string };
body: { userData?: string };
}

export type UpdatePersonFaceParameters = UpdatePersonFaceBodyParam &
RequestParameters;
export type GetPersonFacesParameters = RequestParameters;

export interface CreateDynamicPersonGroupWithPersonBodyParam {
body?: { name: string; userData?: string; addPersonIds: string[] };
body: { name: string; userData?: string; addPersonIds: string[] };
}

export type CreateDynamicPersonGroupWithPersonParameters =
CreateDynamicPersonGroupWithPersonBodyParam & RequestParameters;

export interface CreateDynamicPersonGroupBodyParam {
body?: { name: string; userData?: string };
body: { name: string; userData?: string };
}

export type CreateDynamicPersonGroupParameters =
Expand All @@ -914,7 +914,7 @@ export type DeleteDynamicPersonGroupParameters = RequestParameters;
export type GetDynamicPersonGroupParameters = RequestParameters;

export interface UpdateDynamicPersonGroupWithPersonChangesBodyParam {
body?: {
body: {
name?: string;
userData?: string;
addPersonIds?: string[];
Expand All @@ -926,7 +926,7 @@ export type UpdateDynamicPersonGroupWithPersonChangesParameters =
UpdateDynamicPersonGroupWithPersonChangesBodyParam & RequestParameters;

export interface UpdateDynamicPersonGroupBodyParam {
body?: { name?: string; userData?: string };
body: { name?: string; userData?: string };
}

export type UpdateDynamicPersonGroupParameters =
Expand Down Expand Up @@ -961,7 +961,7 @@ export type GetDynamicPersonGroupPersonsParameters =
GetDynamicPersonGroupPersonsQueryParam & RequestParameters;

export interface CreateLivenessSessionBodyParam {
body?: LivenessSessionCreationContent;
body: LivenessSessionCreationContent;
}

export type CreateLivenessSessionParameters = CreateLivenessSessionBodyParam &
Expand Down Expand Up @@ -998,7 +998,7 @@ export type GetLivenessSessionAuditEntriesParameters =
GetLivenessSessionAuditEntriesQueryParam & RequestParameters;

export interface CreateLivenessWithVerifySessionWithVerifyImageBodyParam {
body?: LivenessSessionWithVerifyImageCreationContent;
body: LivenessSessionWithVerifyImageCreationContent;
}

export interface CreateLivenessWithVerifySessionWithVerifyImageMediaTypesParam {
Expand All @@ -1012,7 +1012,7 @@ export type CreateLivenessWithVerifySessionWithVerifyImageParameters =
RequestParameters;

export interface CreateLivenessWithVerifySessionBodyParam {
body?: LivenessSessionCreationContent;
body: LivenessSessionCreationContent;
}

export type CreateLivenessWithVerifySessionParameters =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ export default createClient;

// @public (undocumented)
export interface CreateJob {
post(options?: CreateJobParameters): StreamableMethod<CreateJob202Response | CreateJobDefaultResponse>;
post(options: CreateJobParameters): StreamableMethod<CreateJob202Response | CreateJobDefaultResponse>;
}

// @public (undocumented)
Expand All @@ -235,7 +235,7 @@ export interface CreateJob202Response extends HttpResponse {
// @public (undocumented)
export interface CreateJobBodyParam {
// (undocumented)
body?: RadiologyInsightsData;
body: RadiologyInsightsData;
}

// @public (undocumented)
Expand Down
Loading

0 comments on commit a68a6bf

Please sign in to comment.