Skip to content

Commit

Permalink
Added Request and Response Bodies for 2 main Point-in-time endpoints (#…
Browse files Browse the repository at this point in the history
…105)

* Added Request and Response Bodies for 2 main Point-in-time endpoints

Signed-off-by: Tokesh <[email protected]>

* fixing common structure variables

Signed-off-by: Niyazbek Torekeldi <[email protected]>

* adding httpPayload annotation

Signed-off-by: Niyazbek Torekeldi <[email protected]>

* refactoring common structure file in root folder

Signed-off-by: Tokesh <[email protected]>

* renaming structures

Signed-off-by: Tokesh <[email protected]>

---------

Signed-off-by: Tokesh <[email protected]>
Signed-off-by: Niyazbek Torekeldi <[email protected]>
  • Loading branch information
Tokesh committed Jun 30, 2023
1 parent 9c438fd commit 9ee4a5e
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 17 deletions.
2 changes: 1 addition & 1 deletion model/_global/delete_pit/operations.smithy
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use opensearch.openapi#vendorExtensions

@vendorExtensions(
"x-operation-group": "delete_pit",
"x-version-added": "1.0",
"x-version-added": "2.4",
)
@idempotent
@suppress(["HttpUriConflict", "HttpMethodSemantics.UnexpectedPayload"])
Expand Down
32 changes: 22 additions & 10 deletions model/_global/delete_pit/structures.smithy
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,32 @@
$version: "2"
namespace OpenSearch

@mixin
structure DeletePit_QueryParams {
list DeletedPitList {
member: DeletedPit
}

// TODO: Fill in Body Parameters
@documentation("Comma-separated list of pit IDs to clear")
structure DeletePit_BodyParams {}
structure DeletedPit {
successful: Boolean,
pit_id: String
}

@input
structure DeletePit_Input with [DeletePit_QueryParams] {
list PitIds{
member: String
}


structure DeletePit_BodyParams {
@required
pit_id: PitIds
}

@input
structure DeletePit_Input {
@httpPayload
content: DeletePit_BodyParams,
content: DeletePit_BodyParams
}

// TODO: Fill in Output Structure
structure DeletePit_Output {}
@output
structure DeletePit_Output {
pits: DeletedPitList
}
2 changes: 1 addition & 1 deletion model/_global/get_all_pits/operations.smithy
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use opensearch.openapi#vendorExtensions

@vendorExtensions(
"x-operation-group": "get_all_pits",
"x-version-added": "1.0",
"x-version-added": "2.4",
)
@readonly
@suppress(["HttpUriConflict"])
Expand Down
17 changes: 12 additions & 5 deletions model/_global/get_all_pits/structures.smithy
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,21 @@
$version: "2"
namespace OpenSearch

@mixin
structure GetAllPits_QueryParams {
structure PitDetail{
pit_id: String,
creation_time: Long,
keep_alive: Long
}

list PitDetailList{
member: PitDetail
}

@input
structure GetAllPits_Input with [GetAllPits_QueryParams] {
structure GetAllPits_Input {
}

// TODO: Fill in Output Structure
structure GetAllPits_Output {}
@output
structure GetAllPits_Output {
pits: PitDetailList
}

0 comments on commit 9ee4a5e

Please sign in to comment.