Skip to content

Commit f1c0a8e

Browse files
authored
Merge pull request #61 from adzerk/vinodkurup/sc-49435/new-endpoint-v2-campaign
Prep spec for /v2/campaign
2 parents 3019753 + 7584406 commit f1c0a8e

File tree

11 files changed

+274
-455
lines changed

11 files changed

+274
-455
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,12 @@ $ openapi-generator generate \
6464

6565
### Management SDK
6666

67+
Note to maintainers: The openapi-3.yaml file doesn't fully reference all of the
68+
endpoints and schemas in the individual entity YAML files. For this reason, please make
69+
sure to update both the individual entity YAML file AND the openapi-3.yaml file when
70+
making changes. Bonus points for linking the 2 with `$ref` so that there is only one
71+
place to make changes.
72+
6773
#### JavaScript
6874

6975
```sh
@@ -82,4 +88,4 @@ $ openapi-generator generate \
8288
-i ./management/openapi-3.yaml \
8389
-o ./build/mgmt-ruby/ \
8490
-c ./management/codegen-config/ruby.json
85-
```
91+
```

management/campaign.yaml

Lines changed: 22 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,26 @@ tags:
99
- name: campaign
1010
description: Manage Campaigns
1111
paths:
12+
/v2/campaign:
13+
post:
14+
tags:
15+
- campaign
16+
description: Create Nested Campaign
17+
operationId: createNested
18+
security:
19+
- ApiKeyAuth: []
20+
requestBody:
21+
content:
22+
application/json:
23+
schema:
24+
$ref: './schemas/campaign.yaml#/schemas/NestedCampaignInput'
25+
responses:
26+
200:
27+
description: Nested Campaign Created
28+
content:
29+
application/json:
30+
schema:
31+
$ref: './schemas/campaign.yaml#/schemas/NestedCampaignOutput'
1232
/v1/campaign:
1333
post:
1434
tags:
@@ -21,57 +41,7 @@ paths:
2141
content:
2242
application/json:
2343
schema:
24-
type: object
25-
required:
26-
- AdvertiserId
27-
- Name
28-
- StartDateISO
29-
properties:
30-
AdvertiserId:
31-
type: integer
32-
format: int32
33-
Name:
34-
type: string
35-
IsActive:
36-
type: boolean
37-
nullable: true
38-
IsDeleted:
39-
type: boolean
40-
default: false
41-
nullable: true
42-
IsArchived:
43-
type: boolean
44-
default: false
45-
nullable: true
46-
FreqCap:
47-
type: integer
48-
format: int32
49-
nullable: true
50-
FreqCapDuration:
51-
type: integer
52-
format: int32
53-
nullable: true
54-
FreqCapType:
55-
type: integer
56-
format: int32
57-
enum: [1, 2, 3]
58-
nullable: true
59-
DontAffectParentFreqCap:
60-
type: boolean
61-
nullable: true
62-
CapType:
63-
type: integer
64-
format: int32
65-
nullable: true
66-
default: 4
67-
DailyCapAmount:
68-
type: integer
69-
format: int32
70-
nullable: true
71-
LifetimeCapAmount:
72-
type: integer
73-
format: int32
74-
nullable: true
44+
$ref: './schemas/campaign.yaml#/schemas/Campaign'
7545
responses:
7646
200:
7747
description: Campaign Created
@@ -235,4 +205,4 @@ paths:
235205
$ref: './schemas/campaign.yaml#/schemas/CampaignList'
236206
components:
237207
securitySchemes:
238-
$ref: './components/security-schemes.yaml#/components/securitySchemes'
208+
$ref: './components/security-schemes.yaml#/components/securitySchemes'

management/creative.yaml

Lines changed: 2 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -21,68 +21,7 @@ paths:
2121
content:
2222
application/json:
2323
schema:
24-
type: object
25-
required:
26-
- AdvertiserId
27-
- AdTypeId
28-
- IsActive
29-
properties:
30-
AdvertiserId:
31-
type: integer
32-
format: int32
33-
AdTypeId:
34-
type: integer
35-
format: int32
36-
IsActive:
37-
type: boolean
38-
default: false
39-
Title:
40-
type: string
41-
nullable: true
42-
ImageName:
43-
type: string
44-
nullable: true
45-
Body:
46-
type: string
47-
nullable: true
48-
Url:
49-
type: string
50-
nullable: true
51-
format: url
52-
Alt:
53-
type: string
54-
nullable: true
55-
IsDeleted:
56-
type: boolean
57-
nullable: true
58-
IsHTMLJS:
59-
type: boolean
60-
nullable: true
61-
ScriptBody:
62-
type: string
63-
nullable: true
64-
Metadata:
65-
type: string
66-
nullable: true
67-
ImageLink:
68-
type: string
69-
nullable: true
70-
SaveEmptyCreative:
71-
type: boolean
72-
nullable: true
73-
IsNoTrack:
74-
type: boolean
75-
nullable: true
76-
IsNetworkAd:
77-
type: boolean
78-
nullable: true
79-
TemplateId:
80-
type: integer
81-
format: int32
82-
nullable: true
83-
TemplateValues:
84-
type: string
85-
nullable: true
24+
$ref: './schemas/creative.yaml#/schemas/Creative'
8625
responses:
8726
200:
8827
description: Creative Created
@@ -313,4 +252,4 @@ paths:
313252
$ref: './schemas/creative.yaml#/schemas/CreativeList'
314253
components:
315254
securitySchemes:
316-
$ref: './components/security-schemes.yaml#/components/securitySchemes'
255+
$ref: './components/security-schemes.yaml#/components/securitySchemes'

0 commit comments

Comments
 (0)