Skip to content

Commit

Permalink
add more deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
snazy committed Jul 1, 2024
1 parent 79eb809 commit cc10a13
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 3 deletions.
17 changes: 16 additions & 1 deletion open-api/rest-catalog-open-api.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,8 @@ class TokenType(BaseModel):

class OAuthClientCredentialsRequest(BaseModel):
"""
The `oauth/tokens` endpoint and related schemas are **DEPRECATED for REMOVAL** from this spec.
OAuth2 client credentials request
See https://datatracker.ietf.org/doc/html/rfc6749#section-4.4
Expand All @@ -481,6 +483,8 @@ class OAuthClientCredentialsRequest(BaseModel):

class OAuthTokenExchangeRequest(BaseModel):
"""
The `oauth/tokens` endpoint and related schemas are **DEPRECATED for REMOVAL** from this spec.
OAuth2 token exchange request
See https://datatracker.ietf.org/doc/html/rfc8693
Expand All @@ -500,7 +504,10 @@ class OAuthTokenExchangeRequest(BaseModel):


class OAuthTokenRequest(BaseModel):
__root__: Union[OAuthClientCredentialsRequest, OAuthTokenExchangeRequest]
__root__: Union[OAuthClientCredentialsRequest, OAuthTokenExchangeRequest] = Field(
...,
description='The `oauth/tokens` endpoint and related schemas are **DEPRECATED for REMOVAL** from this spec.',
)


class CounterResult(BaseModel):
Expand Down Expand Up @@ -532,6 +539,10 @@ class CommitReport(BaseModel):


class OAuthError(BaseModel):
"""
The `oauth/tokens` endpoint and related schemas are **DEPRECATED for REMOVAL** from this spec.
"""

error: Literal[
'invalid_request',
'invalid_client',
Expand All @@ -545,6 +556,10 @@ class OAuthError(BaseModel):


class OAuthTokenResponse(BaseModel):
"""
The `oauth/tokens` endpoint and related schemas are **DEPRECATED for REMOVAL** from this spec.
"""

access_token: str = Field(
..., description='The access token, for client credentials or token exchange'
)
Expand Down
16 changes: 14 additions & 2 deletions open-api/rest-catalog-open-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2933,7 +2933,10 @@ components:
See https://datatracker.ietf.org/doc/html/rfc8693#section-3

OAuthClientCredentialsRequest:
description:
deprecated: true
description: The `oauth/tokens` endpoint and related schemas are **DEPRECATED for REMOVAL** from this spec.


OAuth2 client credentials request


Expand Down Expand Up @@ -2968,7 +2971,10 @@ components:
a Basic Authorization header.

OAuthTokenExchangeRequest:
description:
deprecated: true
description: The `oauth/tokens` endpoint and related schemas are **DEPRECATED for REMOVAL** from this spec.


OAuth2 token exchange request


Expand Down Expand Up @@ -2999,6 +3005,8 @@ components:
$ref: '#/components/schemas/TokenType'

OAuthTokenRequest:
deprecated: true
description: The `oauth/tokens` endpoint and related schemas are **DEPRECATED for REMOVAL** from this spec.
anyOf:
- $ref: '#/components/schemas/OAuthClientCredentialsRequest'
- $ref: '#/components/schemas/OAuthTokenExchangeRequest'
Expand Down Expand Up @@ -3153,6 +3161,8 @@ components:
type: string

OAuthError:
deprecated: true
description: The `oauth/tokens` endpoint and related schemas are **DEPRECATED for REMOVAL** from this spec.
type: object
required:
- error
Expand All @@ -3172,6 +3182,8 @@ components:
type: string

OAuthTokenResponse:
deprecated: true
description: The `oauth/tokens` endpoint and related schemas are **DEPRECATED for REMOVAL** from this spec.
type: object
required:
- access_token
Expand Down

0 comments on commit cc10a13

Please sign in to comment.