Skip to content

Commit

Permalink
fix: correct scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
siloneco committed Jan 5, 2024
1 parent 9306e93 commit a376b9c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 22 deletions.
16 changes: 1 addition & 15 deletions openapi/api_definition.swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,7 @@ paths:
tags:
- TagsService
definitions:
resourcesDiscordToken:
type: object
example:
access_token: token
expired_at: expire-time
refresh_token: refresh-token
properties:
token:
$ref: '#/definitions/resourcesToken'
resourcesToken:
rpcDiscordCallbackResponse:
type: object
properties:
access_token:
Expand All @@ -94,11 +85,6 @@ definitions:
type: string
expired_at:
type: string
rpcDiscordCallbackResponse:
type: object
properties:
token:
$ref: '#/definitions/resourcesDiscordToken'
rpcGetTagsResponse:
type: object
properties:
Expand Down
6 changes: 1 addition & 5 deletions proto/schema/auth/discord/callback/resources/callback.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,10 @@ import "proto/third_party/grpc/openapiv2/options/annotations.proto";

option go_package = "./";

message Token {
message DiscordToken {
string access_token = 1;
string refresh_token = 2;
string expired_at = 3;
}

message DiscordToken {
Token token = 1;

option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
example : "{ \"access_token\": \"token\", \"refresh_token\": "
Expand Down
5 changes: 3 additions & 2 deletions proto/schema/auth/discord/callback/rpc/callback.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ syntax = "proto3";

package proto.schema.auth.discord.callback.rpc;

import "proto/schema/auth/discord/callback/resources/callback.proto";
import "proto/third_party/grpc/openapiv2/options/annotations.proto";

option go_package = "./";

message DiscordCallbackResponse {
proto.schema.auth.discord.callback.resources.DiscordToken token = 1;
string access_token = 1;
string refresh_token = 2;
string expired_at = 3;
}

message DiscordCallbackRequest {
Expand Down

0 comments on commit a376b9c

Please sign in to comment.