| 89 | # Request: ActionBulkCreateRequest |
| 90 | # Response: ActionBulkCreateResponse |
| 91 | class ActionBulkCreateRequest(BaseModel): |
| 92 | openapi_schema: Dict = Field( |
| 93 | ..., |
| 94 | description="The action schema is compliant with the OpenAPI Specification. " |
| 95 | "If there are multiple paths and methods in the schema, " |
| 96 | "the server will create multiple actions whose schema only has exactly one path and one method", |
| 97 | ) |
| 98 | |
| 99 | authentication: ActionAuthentication = Field( |
| 100 | ActionAuthentication(type=ActionAuthenticationType.none), description="The action API authentication." |
| 101 | ) |
| 102 | |
| 103 | @field_validator("authentication", mode="before") |
| 104 | def validate_authentication(cls, data: Dict): |
| 105 | return validate_authentication_data(data) |
| 106 | |
| 107 | @field_validator("openapi_schema") |
| 108 | def validate_schema(cls, openapi_schema: Dict): |
| 109 | return validate_openapi_schema(openapi_schema, only_one_path_and_method=False) |
| 110 | |
| 111 | @model_validator(mode="after") |
| 112 | def validate(cls, data: Any): |
| 113 | data.authentication.encrypt() |
| 114 | return data |
| 115 | |
| 116 | |
| 117 | class ActionBulkCreateResponse(BaseModel): |
nothing calls this directly
no test coverage detected