Skip to content

Commit 6dc101f

Browse files
Fix template error and add audience path to permission
1 parent 102ba4a commit 6dc101f

File tree

1 file changed

+36
-10
lines changed

1 file changed

+36
-10
lines changed

templates/template-core.yaml

+36-10
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ paths:
6464
200:
6565
description: "200 response"
6666
schema:
67-
$ref: "#/definitions/GroupsResponse"
67+
$ref: "#/definitions/GroupResponse"
6868
400:
6969
description: "400 response"
7070
schema:
@@ -240,7 +240,7 @@ paths:
240240
200:
241241
description: "200 response"
242242
schema:
243-
$ref: "#/definitions/GroupsResponse"
243+
$ref: "#/definitions/GroupResponse"
244244
400:
245245
description: "400 response"
246246
schema:
@@ -786,15 +786,19 @@ paths:
786786
passthroughBehavior: "never"
787787
httpMethod: "POST"
788788
type: "aws"
789-
/permissions/{application}:
789+
/permissions/{application}/{audience}:
790790
get:
791791
consumes:
792792
- "application/json"
793793
produces:
794794
- "application/json"
795795
parameters:
796+
- name: "application"
797+
in: "path"
798+
required: true
799+
type: "string"
796800
- name: "audience"
797-
in: "query"
801+
in: "path"
798802
required: true
799803
type: "string"
800804
- name: "Authorization"
@@ -827,6 +831,14 @@ paths:
827831
produces:
828832
- "application/json"
829833
parameters:
834+
- name: "application"
835+
in: "path"
836+
required: true
837+
type: "string"
838+
- name: "audience"
839+
in: "path"
840+
required: true
841+
type: "string"
830842
- name: "Authorization"
831843
in: "header"
832844
required: true
@@ -874,32 +886,36 @@ paths:
874886
\ "
875887
requestTemplates:
876888
application/json: "{\n \"name\": $input.json('$.name'),\n \"description\"\
877-
: $input.json('$.description'),\n \"audience\": $input.json('$.audience'),\n\
889+
: $input.json('$.description'),\n \"audience\": \"$input.params('audience')\",\n\
878890
\ \"client_id\": \"$input.params('application')\",\n \"api_request_id\"\
879891
: \"$input.params('API-Request-Id')\",\n \"api_client_id\": \"$input.params('API-Client-Id')\"\
880892
\n}\n"
881893
passthroughBehavior: "never"
882894
httpMethod: "POST"
883895
type: "aws"
884-
/permissions/{application}/{id}:
896+
/permissions/{application}/{audience}/{id}:
885897
delete:
886898
consumes:
887899
- "application/json"
888900
produces:
889901
- "application/json"
890902
parameters:
891-
- name: "audience"
892-
in: "query"
903+
- name: "application"
904+
in: "path"
893905
required: true
894906
type: "string"
895-
- name: "Authorization"
896-
in: "header"
907+
- name: "audience"
908+
in: "path"
897909
required: true
898910
type: "string"
899911
- name: "id"
900912
in: "path"
901913
required: true
902914
type: "string"
915+
- name: "Authorization"
916+
in: "header"
917+
required: true
918+
type: "string"
903919
responses:
904920
200:
905921
description: "200 response"
@@ -2001,6 +2017,16 @@ definitions:
20012017
description:
20022018
type: "string"
20032019
title: "PermissionResponse"
2020+
GroupResponse:
2021+
title: "GroupResponse"
2022+
type: "object"
2023+
properties:
2024+
id:
2025+
type: "string"
2026+
name:
2027+
type: "string"
2028+
description:
2029+
type: "string"
20042030
GroupsResponse:
20052031
title: "GroupsResponse"
20062032
type: "array"

0 commit comments

Comments
 (0)