From b8b0ce4001f8c9f8b361b3fd5fa43fbb458ecd16 Mon Sep 17 00:00:00 2001 From: Vinod Kurup Date: Mon, 20 Nov 2023 15:33:38 -0500 Subject: [PATCH] Updates to api-spec for POST /v1/campaign --- management/openapi-3.yaml | 2 +- management/schemas/campaign.yaml | 19 +++++++++++-------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/management/openapi-3.yaml b/management/openapi-3.yaml index cf0c933..91165a7 100644 --- a/management/openapi-3.yaml +++ b/management/openapi-3.yaml @@ -203,7 +203,7 @@ paths: content: application/json: schema: - type: object + $ref: './schemas/campaign.yaml#/schemas/Campaign' responses: 200: description: Campaign Created diff --git a/management/schemas/campaign.yaml b/management/schemas/campaign.yaml index 85fb748..a395d44 100644 --- a/management/schemas/campaign.yaml +++ b/management/schemas/campaign.yaml @@ -9,6 +9,7 @@ schemas: AdvertiserId: type: integer format: int32 + minimum: 1 Name: type: string minLength: 1 @@ -22,7 +23,6 @@ schemas: IsArchived: type: boolean default: false - nullable: true FreqCap: type: integer format: int32 @@ -62,21 +62,15 @@ schemas: CustomFieldsJson: type: string nullable: true - EndDate: - type: string - nullable: true - deprecated: true IsFreqCap: type: boolean nullable: true + readOnly: true Campaign: allOf: - $ref: '#/schemas/CampaignBase' - type: object - required: - - CampaignId - - StartDate properties: SalespersonId: type: integer @@ -86,23 +80,32 @@ schemas: type: string default: 1/1/2018 deprecated: true + readOnly: true Flights: type: array items: type: object nullable: true + EndDate: + type: string + nullable: true + readOnly: true + deprecated: true EndDateISO: type: string + readOnly: true deprecated: true nullable: true Price: type: number deprecated: true + readOnly: true nullable: true StartDateISO: type: string nullable: true deprecated: true + readOnly: true Created: type: string format: date-time