Skip to content

Commit

Permalink
update action state openAPI response schema
Browse files Browse the repository at this point in the history
  • Loading branch information
ashokaditya committed Aug 9, 2024
1 parent 1391836 commit 8cb0c65
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,20 @@
* version: 2023-10-31
*/

import type { z } from 'zod';
import { z } from 'zod';

import { SuccessResponse } from '../../model/schema/common.gen';
export type ActionStateSuccessResponse = z.infer<typeof ActionStateSuccessResponse>;
export const ActionStateSuccessResponse = z.object({
body: z
.object({
data: z
.object({
canEncrypt: z.boolean().optional(),
})
.optional(),
})
.optional(),
});

export type EndpointGetActionsStateResponse = z.infer<typeof EndpointGetActionsStateResponse>;
export const EndpointGetActionsStateResponse = SuccessResponse;
export const EndpointGetActionsStateResponse = ActionStateSuccessResponse;
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,19 @@ paths:
content:
application/json:
schema:
$ref: '../../model/schema/common.schema.yaml#/components/schemas/SuccessResponse'
$ref: '#/components/schemas/ActionStateSuccessResponse'
components:
schemas:
ActionStateSuccessResponse:
type:
object
properties:
body:
type: object
properties:
data:
type: object
properties:
canEncrypt:
type: boolean

0 comments on commit 8cb0c65

Please sign in to comment.