Skip to content

Commit

Permalink
Merge pull request #12 from livepeer/0xcadams/new-schema
Browse files Browse the repository at this point in the history
fix: added code samples and new master schema
  • Loading branch information
0xcadams authored May 20, 2024
2 parents 9c8eeec + 7dc88e0 commit 8304145
Show file tree
Hide file tree
Showing 55 changed files with 769 additions and 285 deletions.
19 changes: 11 additions & 8 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
lockVersion: 2.0.0
id: 17bba98d-ccbf-4675-8dd5-54aa47cbeeb4
management:
docChecksum: 0a9791e447b0acd047a206660d89f0d2
docChecksum: ed7f9c3c7ce4cdc8b3524a59c596ef0b
docVersion: 1.0.0
speakeasyVersion: 1.290.0
generationVersion: 2.332.1
releaseVersion: 0.1.6
configChecksum: 5561829438fe80b718eef8f660f4f06e
speakeasyVersion: 1.293.1
generationVersion: 2.333.3
releaseVersion: 0.1.7
configChecksum: 4d1ec1d46b5cf1b0bd02ab07e4b2888c
features:
go:
additionalDependencies: 0.1.0
Expand All @@ -25,7 +25,7 @@ features:
nullables: 0.1.0
responseFormat: 0.1.1
sdkHooks: 0.1.0
unions: 2.85.6
unions: 2.85.8
generatedFiles:
- stream.go
- multistream.go
Expand Down Expand Up @@ -262,6 +262,7 @@ generatedFiles:
- docs/models/operations/getpublicviewershipmetricsdata.md
- docs/models/operations/getpublicviewershipmetricsresponse.md
- docs/models/operations/getusagemetricsqueryparamtimestep.md
- docs/models/operations/getusagemetricsqueryparambreakdownby.md
- docs/models/operations/getusagemetricsrequest.md
- docs/models/operations/getusagemetricsresponse.md
- docs/models/operations/createsigningkeyresponse.md
Expand All @@ -282,6 +283,7 @@ generatedFiles:
- docs/models/sdkerrors/error.md
- docs/models/components/three.md
- docs/models/components/streamusertags.md
- docs/models/components/ismobile1.md
- docs/models/components/streamismobile.md
- docs/models/components/streamlocation.md
- docs/models/components/streampull.md
Expand All @@ -307,6 +309,7 @@ generatedFiles:
- docs/models/components/inputcreatoridtype.md
- docs/models/components/inputcreatorid1.md
- docs/models/components/inputcreatorid.md
- docs/models/components/one.md
- docs/models/components/ismobile.md
- docs/models/components/location.md
- docs/models/components/pull.md
Expand All @@ -317,7 +320,7 @@ generatedFiles:
- docs/models/components/assetsourcetype.md
- docs/models/components/two.md
- docs/models/components/sourcetype.md
- docs/models/components/source1.md
- docs/models/components/assetsource1.md
- docs/models/components/assetsource.md
- docs/models/components/assetnftmetadatatemplate.md
- docs/models/components/assetnftmetadata.md
Expand Down Expand Up @@ -362,7 +365,7 @@ generatedFiles:
- docs/models/components/nftmetadata.md
- docs/models/components/spec.md
- docs/models/components/source3.md
- docs/models/components/one.md
- docs/models/components/source1.md
- docs/models/components/source.md
- docs/models/components/assetipfsinput.md
- docs/models/components/assetstorageinput.md
Expand Down
3 changes: 2 additions & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ generation:
auth:
oAuth2ClientCredentialsEnabled: true
go:
version: 0.1.6
version: 0.1.7
additionalDependencies: {}
allowUnknownFieldsInWeakUnions: false
clientServerStatusCodesAsErrors: true
flattenGlobalSecurity: true
imports:
Expand Down
14 changes: 8 additions & 6 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
speakeasyVersion: 1.290.0
speakeasyVersion: 1.293.1
sources:
livepeer-studio-api:
sourceNamespace: livepeer-studio-api
sourceRevisionDigest: sha256:5306a71bee03f0cee007dab92f5e4141c5c071ba9c87834c50dd814dde91bb6d
sourceBlobDigest: sha256:4f054ea02e79a633fd01ef1c579aa39fa820df6a2cce0a64ef8fc4c8cd3021d0
sourceRevisionDigest: sha256:ed3a24e70cf74aa7ed881aa3d73cb267e0647fefc279963105662a9aa2bb5864
sourceBlobDigest: sha256:461dbcf221bde4fa18927d27b9fea500bcae05cdbee9daccfb251e4428f29675
tags:
- latest
targets:
livepeer-go:
source: livepeer-studio-api
sourceNamespace: livepeer-studio-api
sourceRevisionDigest: sha256:5306a71bee03f0cee007dab92f5e4141c5c071ba9c87834c50dd814dde91bb6d
sourceBlobDigest: sha256:4f054ea02e79a633fd01ef1c579aa39fa820df6a2cce0a64ef8fc4c8cd3021d0
sourceRevisionDigest: sha256:ed3a24e70cf74aa7ed881aa3d73cb267e0647fefc279963105662a9aa2bb5864
sourceBlobDigest: sha256:461dbcf221bde4fa18927d27b9fea500bcae05cdbee9daccfb251e4428f29675
outLocation: /Users/chase/git/livepeer/livepeer-go
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
sources:
livepeer-studio-api:
inputs:
- location: https://raw.githubusercontent.com/livepeer/studio/sk/schema-fixes/packages/api/src/schema/api-schema.yaml
- location: https://raw.githubusercontent.com/livepeer/studio/master/packages/api/src/schema/api-schema.yaml
overlays:
- location: ./overlay.yaml
registry:
Expand All @@ -28,3 +28,5 @@ workflow:
livepeer-go:
target: go
source: livepeer-studio-api
codeSamples:
output: codeSamples.yaml
4 changes: 3 additions & 1 deletion .speakeasy/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ speakeasyVersion: latest
sources:
livepeer-studio-api:
inputs:
- location: https://raw.githubusercontent.com/livepeer/studio/sk/schema-fixes/packages/api/src/schema/api-schema.yaml
- location: https://raw.githubusercontent.com/livepeer/studio/master/packages/api/src/schema/api-schema.yaml
overlays:
- location: ./overlay.yaml
registry:
Expand All @@ -12,3 +12,5 @@ targets:
livepeer-go:
target: go
source: livepeer-studio-api
codeSamples:
output: codeSamples.yaml
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ import (
"context"
"errors"
livepeergo "github.com/livepeer/livepeer-go"
"github.com/livepeer/livepeer-go/models/components"
"github.com/livepeer/livepeer-go/models/sdkerrors"
"log"
)
Expand Down
2 changes: 1 addition & 1 deletion asset.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ func (s *Asset) Create(ctx context.Context, request components.NewAssetPayload)
httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody))

switch {
case httpRes.StatusCode == 201:
case httpRes.StatusCode == 200:
switch {
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
var out operations.RequestUploadData
Expand Down
Loading

0 comments on commit 8304145

Please sign in to comment.