Skip to content

Commit

Permalink
rename object
Browse files Browse the repository at this point in the history
  • Loading branch information
finn-block committed Oct 18, 2023
1 parent 2a18256 commit 189574d
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 43 deletions.
30 changes: 15 additions & 15 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,111 +107,111 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/EncodingDecodeRequestResponse"
$ref: "#/components/schemas/StringEncodedData"
required: true
responses:
"200":
description: Successful operation
content:
application/json:
schema:
$ref: "#/components/schemas/EncodingDecodeRequestResponse"
$ref: "#/components/schemas/StringEncodedData"
/encoders/base64/decode:
post:
operationId: encoders_base64_decode
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/EncodingDecodeRequestResponse"
$ref: "#/components/schemas/StringEncodedData"
required: true
responses:
"200":
description: Successful operation
content:
application/json:
schema:
$ref: "#/components/schemas/EncodingDecodeRequestResponse"
$ref: "#/components/schemas/StringEncodedData"
/encoders/base58/encode:
post:
operationId: encoders_base58_encode
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/EncodingDecodeRequestResponse"
$ref: "#/components/schemas/StringEncodedData"
required: true
responses:
"200":
description: Successful operation
content:
application/json:
schema:
$ref: "#/components/schemas/EncodingDecodeRequestResponse"
$ref: "#/components/schemas/StringEncodedData"
/encoders/base58/decode:
post:
operationId: encoders_base58_decode
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/EncodingDecodeRequestResponse"
$ref: "#/components/schemas/StringEncodedData"
required: true
responses:
"200":
description: Successful operation
content:
application/json:
schema:
$ref: "#/components/schemas/EncodingDecodeRequestResponse"
$ref: "#/components/schemas/StringEncodedData"
/encoders/sha256/encode:
post:
operationId: encoders_sha256_encode
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/EncodingDecodeRequestResponse"
$ref: "#/components/schemas/StringEncodedData"
required: true
responses:
"200":
description: Successful operation
content:
application/json:
schema:
$ref: "#/components/schemas/EncodingDecodeRequestResponse"
$ref: "#/components/schemas/StringEncodedData"
/encoders/cbor/encode:
post:
operationId: encoders_cbor_encode
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/EncodingDecodeRequestResponse"
$ref: "#/components/schemas/StringEncodedData"
required: true
responses:
"200":
description: Successful operation
content:
application/json:
schema:
$ref: "#/components/schemas/EncodingDecodeRequestResponse"
$ref: "#/components/schemas/StringEncodedData"
/encoders/cbor/decode:
post:
operationId: encoders_cbor_decode
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/EncodingDecodeRequestResponse"
$ref: "#/components/schemas/StringEncodedData"
required: true
responses:
"200":
description: Successful operation
content:
application/json:
schema:
$ref: "#/components/schemas/EncodingDecodeRequestResponse"
$ref: "#/components/schemas/StringEncodedData"

/ready:
get:
Expand Down Expand Up @@ -399,7 +399,7 @@ components:
properties:
did:
type: string
EncodingDecodeRequestResponse:
StringEncodedData:
type: object
required:
- data
Expand Down
46 changes: 23 additions & 23 deletions openapi/openapi.go

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

10 changes: 5 additions & 5 deletions tests/encoders.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func encoderBase64Decode(ctx context.Context, serverURL string) []error {

b64 := base64.RawStdEncoding.EncodeToString([]byte(expected))

resp, err := client.EncodersBase64DecodeWithResponse(ctx, openapi.EncodingDecodeRequestResponse{Data: b64})
resp, err := client.EncodersBase64DecodeWithResponse(ctx, openapi.StringEncodedData{Data: b64})
if err != nil {
return []error{err}
}
Expand All @@ -58,7 +58,7 @@ func encoderBase58Encode(ctx context.Context, serverURL string) []error {
input := generateRandomString(128)
expected := base58.Encode([]byte(input))

resp, err := client.EncodersBase58EncodeWithResponse(ctx, openapi.EncodingDecodeRequestResponse{Data: input})
resp, err := client.EncodersBase58EncodeWithResponse(ctx, openapi.StringEncodedData{Data: input})
if err != nil {
return []error{err}
}
Expand All @@ -85,7 +85,7 @@ func encoderBase58Decode(ctx context.Context, serverURL string) []error {

b58 := base58.Encode([]byte(expected))

resp, err := client.EncodersBase58DecodeWithResponse(ctx, openapi.EncodingDecodeRequestResponse{Data: b58})
resp, err := client.EncodersBase58DecodeWithResponse(ctx, openapi.StringEncodedData{Data: b58})
if err != nil {
return []error{err}
}
Expand All @@ -111,7 +111,7 @@ func encoderBase64Encode(ctx context.Context, serverURL string) []error {
input := generateRandomString(128)
expected := base64.RawStdEncoding.EncodeToString([]byte(input))

resp, err := client.EncodersBase64EncodeWithResponse(ctx, openapi.EncodingDecodeRequestResponse{Data: input})
resp, err := client.EncodersBase64EncodeWithResponse(ctx, openapi.StringEncodedData{Data: input})
if err != nil {
return []error{err}
}
Expand All @@ -137,7 +137,7 @@ func encoderSha256Encode(ctx context.Context, serverURL string) []error {
input := generateRandomString(128)
expected := fmt.Sprintf("%x", sha256.Sum256([]byte(input)))

resp, err := client.EncodersSha256EncodeWithResponse(ctx, openapi.EncodingDecodeRequestResponse{Data: input})
resp, err := client.EncodersSha256EncodeWithResponse(ctx, openapi.StringEncodedData{Data: input})
if err != nil {
return []error{err}
}
Expand Down

0 comments on commit 189574d

Please sign in to comment.