diff --git a/components/renku_data_services/connected_services/api.spec.yaml b/components/renku_data_services/connected_services/api.spec.yaml index 7b235b882..c422d5dc4 100644 --- a/components/renku_data_services/connected_services/api.spec.yaml +++ b/components/renku_data_services/connected_services/api.spec.yaml @@ -412,12 +412,15 @@ components: setting up a GitHub App. type: string example: "my-application" + maxLength: 500 ClientId: description: | Client ID or Application ID value. This is provided by the Resource Server when setting up a new OAuth2 Client. type: string example: "some-client-id" + minLength: 1 + maxLength: 99 ClientSecret: description: | Client secret provided by the Resource Server when setting @@ -427,6 +430,8 @@ components: DisplayName: type: string example: "my oauth2 application" + minLength: 1 + maxLength: 99 ApiScope: type: string example: "api" diff --git a/components/renku_data_services/connected_services/apispec.py b/components/renku_data_services/connected_services/apispec.py index bac27d378..d3230a8be 100644 --- a/components/renku_data_services/connected_services/apispec.py +++ b/components/renku_data_services/connected_services/apispec.py @@ -1,6 +1,6 @@ # generated by datamodel-codegen: # filename: api.spec.yaml -# timestamp: 2025-03-19T10:21:11+00:00 +# timestamp: 2025-05-19T08:21:49+00:00 from __future__ import annotations @@ -97,18 +97,23 @@ class Provider(BaseAPISpec): ..., description="URL-friendly name of the application. This field only applies to\nGitHub Applications. The slug is provided by GitHub when\nsetting up a GitHub App.\n", examples=["my-application"], + max_length=500, ) client_id: str = Field( ..., description="Client ID or Application ID value. This is provided by\nthe Resource Server when setting up a new OAuth2 Client.\n", examples=["some-client-id"], + max_length=99, + min_length=1, ) client_secret: Optional[str] = Field( None, description="Client secret provided by the Resource Server when setting\nup a new OAuth2 Client.\n", examples=["some-client-secret"], ) - display_name: str = Field(..., examples=["my oauth2 application"]) + display_name: str = Field( + ..., examples=["my oauth2 application"], max_length=99, min_length=1 + ) scope: str = Field(..., examples=["api"]) url: str = Field( ..., @@ -136,18 +141,23 @@ class ProviderPost(BaseAPISpec): None, description="URL-friendly name of the application. This field only applies to\nGitHub Applications. The slug is provided by GitHub when\nsetting up a GitHub App.\n", examples=["my-application"], + max_length=500, ) client_id: str = Field( ..., description="Client ID or Application ID value. This is provided by\nthe Resource Server when setting up a new OAuth2 Client.\n", examples=["some-client-id"], + max_length=99, + min_length=1, ) client_secret: Optional[str] = Field( None, description="Client secret provided by the Resource Server when setting\nup a new OAuth2 Client.\n", examples=["some-client-secret"], ) - display_name: str = Field(..., examples=["my oauth2 application"]) + display_name: str = Field( + ..., examples=["my oauth2 application"], max_length=99, min_length=1 + ) scope: str = Field(..., examples=["api"]) url: str = Field( ..., @@ -155,7 +165,7 @@ class ProviderPost(BaseAPISpec): examples=["https://example.org"], ) use_pkce: Optional[bool] = Field( - None, + False, description="Whether or not to use PKCE during authorization flows.\n", examples=[False], ) @@ -170,18 +180,23 @@ class ProviderPatch(BaseAPISpec): None, description="URL-friendly name of the application. This field only applies to\nGitHub Applications. The slug is provided by GitHub when\nsetting up a GitHub App.\n", examples=["my-application"], + max_length=500, ) client_id: Optional[str] = Field( None, description="Client ID or Application ID value. This is provided by\nthe Resource Server when setting up a new OAuth2 Client.\n", examples=["some-client-id"], + max_length=99, + min_length=1, ) client_secret: Optional[str] = Field( None, description="Client secret provided by the Resource Server when setting\nup a new OAuth2 Client.\n", examples=["some-client-secret"], ) - display_name: Optional[str] = Field(None, examples=["my oauth2 application"]) + display_name: Optional[str] = Field( + None, examples=["my oauth2 application"], max_length=99, min_length=1 + ) scope: Optional[str] = Field(None, examples=["api"]) url: Optional[str] = Field( None, @@ -189,7 +204,7 @@ class ProviderPatch(BaseAPISpec): examples=["https://example.org"], ) use_pkce: Optional[bool] = Field( - None, + False, description="Whether or not to use PKCE during authorization flows.\n", examples=[False], )