Skip to content

Commit

Permalink
fix: some incorrect API docs
Browse files Browse the repository at this point in the history
  • Loading branch information
alnr committed Sep 11, 2024
1 parent 0864d49 commit b7de5c8
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 39 deletions.
4 changes: 2 additions & 2 deletions consent/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,9 @@ type revokeOAuth2LoginSessions struct {
// in: query
Subject string `json:"subject"`

// OAuth 2.0 Subject
// Login Session ID
//
// The subject to revoke authentication sessions for.
// The login session to revoke.
//
// in: query
SessionID string `json:"sid"`
Expand Down
30 changes: 15 additions & 15 deletions internal/httpclient/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ paths:
"204":
description: |-
Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is
typically 201.
typically 204.
default:
content:
application/json:
Expand Down Expand Up @@ -402,7 +402,7 @@ paths:
"204":
description: |-
Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is
typically 201.
typically 204.
default:
content:
application/json:
Expand Down Expand Up @@ -549,7 +549,7 @@ paths:
"204":
description: |-
Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is
typically 201.
typically 204.
default:
content:
application/json:
Expand Down Expand Up @@ -1008,7 +1008,7 @@ paths:
"204":
description: |-
Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is
typically 201.
typically 204.
default:
content:
application/json:
Expand Down Expand Up @@ -1062,7 +1062,7 @@ paths:
"204":
description: |-
Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is
typically 201.
typically 204.
default:
content:
application/json:
Expand Down Expand Up @@ -1166,9 +1166,9 @@ paths:
type: string
style: form
- description: |-
OAuth 2.0 Subject
Login Session ID
The subject to revoke authentication sessions for.
The login session to revoke.
explode: true
in: query
name: sid
Expand All @@ -1180,7 +1180,7 @@ paths:
"204":
description: |-
Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is
typically 201.
typically 204.
default:
content:
application/json:
Expand Down Expand Up @@ -1236,7 +1236,7 @@ paths:
"204":
description: |-
Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is
typically 201.
typically 204.
default:
content:
application/json:
Expand Down Expand Up @@ -1342,7 +1342,7 @@ paths:
"204":
description: |-
Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is
typically 201.
typically 204.
default:
content:
application/json:
Expand Down Expand Up @@ -1489,7 +1489,7 @@ paths:
"302":
description: |-
Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is
typically 201.
typically 204.
default:
content:
application/json:
Expand Down Expand Up @@ -1572,7 +1572,7 @@ paths:
"204":
description: |-
Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is
typically 201.
typically 204.
default:
content:
application/json:
Expand Down Expand Up @@ -1698,7 +1698,7 @@ paths:
"200":
description: |-
Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is
typically 201.
typically 204.
default:
content:
application/json:
Expand All @@ -1725,7 +1725,7 @@ paths:
"302":
description: |-
Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is
typically 201.
typically 204.
summary: OpenID Connect Front- and Back-channel Enabled Logout
tags:
- oidc
Expand Down Expand Up @@ -1816,7 +1816,7 @@ components:
emptyResponse:
description: |-
Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is
typically 201.
typically 204.
errorOAuth2BadRequest:
content:
application/json:
Expand Down
2 changes: 1 addition & 1 deletion internal/httpclient/api_o_auth2.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions internal/httpclient/docs/OAuth2API.md
Original file line number Diff line number Diff line change
Expand Up @@ -1620,7 +1620,7 @@ import (

func main() {
subject := "subject_example" // string | OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional)
sid := "sid_example" // string | OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional)
sid := "sid_example" // string | Login Session ID The login session to revoke. (optional)

configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
Expand All @@ -1644,7 +1644,7 @@ Other parameters are passed through a pointer to a apiRevokeOAuth2LoginSessionsR
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**subject** | **string** | OAuth 2.0 Subject The subject to revoke authentication sessions for. |
**sid** | **string** | OAuth 2.0 Subject The subject to revoke authentication sessions for. |
**sid** | **string** | Login Session ID The login session to revoke. |

### Return type

Expand Down
4 changes: 2 additions & 2 deletions spec/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"components": {
"responses": {
"emptyResponse": {
"description": "Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is\ntypically 201."
"description": "Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is\ntypically 204."
},
"errorOAuth2BadRequest": {
"content": {
Expand Down Expand Up @@ -3017,7 +3017,7 @@
}
},
{
"description": "OAuth 2.0 Subject\n\nThe subject to revoke authentication sessions for.",
"description": "Login Session ID\n\nThe login session to revoke.",
"in": "query",
"name": "sid",
"schema": {
Expand Down
4 changes: 2 additions & 2 deletions spec/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -1305,7 +1305,7 @@
},
{
"type": "string",
"description": "OAuth 2.0 Subject\n\nThe subject to revoke authentication sessions for.",
"description": "Login Session ID\n\nThe login session to revoke.",
"name": "sid",
"in": "query"
}
Expand Down Expand Up @@ -3670,7 +3670,7 @@
,"UUID":{"type": "string", "format": "uuid4"}},
"responses": {
"emptyResponse": {
"description": "Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is\ntypically 201."
"description": "Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is\ntypically 204."
},
"errorOAuth2BadRequest": {
"description": "Bad Request Error Response",
Expand Down
20 changes: 5 additions & 15 deletions x/doc_swagger.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,14 @@
package x

// Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is
// typically 201.
// typically 204.
//
// swagger:response emptyResponse
//
//lint:ignore U1000 Used to generate Swagger and OpenAPI definitions
type emptyResponse struct{}
type _ struct{}

// Error
//
// swagger:model errorOAuth2
//
//lint:ignore U1000 Used to generate Swagger and OpenAPI definitions
type errorOAuth2 struct {
// Error
Name string `json:"error"`
Expand Down Expand Up @@ -44,29 +40,23 @@ type errorOAuth2 struct {
// Default Error Response
//
// swagger:response errorOAuth2Default
//
//lint:ignore U1000 Used to generate Swagger and OpenAPI definitions
type errorOAuth2Default struct {
type _ struct {
// in: body
Body errorOAuth2
}

// Bad Request Error Response
//
// swagger:response errorOAuth2BadRequest
//
//lint:ignore U1000 Used to generate Swagger and OpenAPI definitions
type errorOAuth2BadRequest struct {
type _ struct {
// in: body
Body errorOAuth2
}

// Not Found Error Response
//
// swagger:response errorOAuth2NotFound
//
//lint:ignore U1000 Used to generate Swagger and OpenAPI definitions
type errorOAuth2NotFound struct {
type _ struct {
// in: body
Body errorOAuth2
}

0 comments on commit b7de5c8

Please sign in to comment.