Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -427,6 +430,8 @@ components:
DisplayName:
type: string
example: "my oauth2 application"
minLength: 1
maxLength: 99
ApiScope:
type: string
example: "api"
Expand Down
27 changes: 21 additions & 6 deletions components/renku_data_services/connected_services/apispec.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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(
...,
Expand Down Expand Up @@ -136,26 +141,31 @@ 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(
...,
description='The base URL of the OAuth2 Resource Server, e.g. "https://gitlab.com".\n',
examples=["https://example.org"],
)
use_pkce: Optional[bool] = Field(
None,
False,
description="Whether or not to use PKCE during authorization flows.\n",
examples=[False],
)
Expand All @@ -170,26 +180,31 @@ 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,
description='The base URL of the OAuth2 Resource Server, e.g. "https://gitlab.com".\n',
examples=["https://example.org"],
)
use_pkce: Optional[bool] = Field(
None,
False,
description="Whether or not to use PKCE during authorization flows.\n",
examples=[False],
)
Expand Down
Loading