Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: deduplicate inline schemas #1302

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ replace github.com/pb33f/libopenapi => github.com/speakeasy-api/libopenapi v0.0.

replace github.com/daveshanley/vacuum => github.com/speakeasy-api/vacuum v0.0.0-20240926095216-18e2075ffe0f

// point at local openapi generation
replace github.com/speakeasy-api/openapi-generation/v2 => ../speakeasy-openapi-generation

// point at local core
replace github.com/speakeasy-api/speakeasy-core => ../speakeasy-core

require (
github.com/AlekSi/pointer v1.2.0
github.com/MichaelMure/go-term-markdown v0.1.4
Expand Down Expand Up @@ -36,7 +42,7 @@ require (
github.com/speakeasy-api/openapi v0.1.6
github.com/speakeasy-api/openapi-generation/v2 v2.533.0
github.com/speakeasy-api/openapi-overlay v0.10.1
github.com/speakeasy-api/sdk-gen-config v1.30.6
github.com/speakeasy-api/sdk-gen-config v1.30.7
github.com/speakeasy-api/speakeasy-client-sdk-go/v3 v3.24.0
github.com/speakeasy-api/speakeasy-core v0.19.6
github.com/speakeasy-api/speakeasy-proxy v0.0.2
Expand Down
8 changes: 2 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -579,16 +579,12 @@ github.com/speakeasy-api/libopenapi v0.0.0-20241006201546-c9e5f704a939 h1:LGtzWU
github.com/speakeasy-api/libopenapi v0.0.0-20241006201546-c9e5f704a939/go.mod h1:9ap4lXBHgxGyFwxtOfa+B1C3IQ0rvnqteqjJvJ11oiQ=
github.com/speakeasy-api/openapi v0.1.6 h1:bpBiJ9P4hSVv2Vddk+ny6zeytPsDq0ttxl6DLAwC0zo=
github.com/speakeasy-api/openapi v0.1.6/go.mod h1:t1HA3wPC8jpGRr0UHW+SIvIB8dT5RXXi39XLrIG/URU=
github.com/speakeasy-api/openapi-generation/v2 v2.533.0 h1:mRsfaYYhHbyzcL/7VtCNRlra+ofJXhMq2dUlkRLeuGk=
github.com/speakeasy-api/openapi-generation/v2 v2.533.0/go.mod h1:rUj7T0SYilFBCd6ekhNrlhhcSLiiGfu6VYvR4E+rwXk=
github.com/speakeasy-api/openapi-overlay v0.10.1 h1:XFx/GvJvtAGf4dcQ6bxzsLNf76x/QWE2X0SSZrWojBQ=
github.com/speakeasy-api/openapi-overlay v0.10.1/go.mod h1:n0iOU7AqKpNFfEt6tq7qYITC4f0yzVVdFw0S7hukemg=
github.com/speakeasy-api/sdk-gen-config v1.30.6 h1:TqwG2EPlQBHMyJi0dNeWKvs1ebJoCN3Uy4/BS50l3EI=
github.com/speakeasy-api/sdk-gen-config v1.30.6/go.mod h1:e9PjnCRHGa4K4EFKVU+kKmihOZjJ2V4utcU+274+bnQ=
github.com/speakeasy-api/sdk-gen-config v1.30.7 h1:SE3ogoiczCn6IXFD3xOw9o+3EnfZZlYx/PimRC7UPdU=
github.com/speakeasy-api/sdk-gen-config v1.30.7/go.mod h1:e9PjnCRHGa4K4EFKVU+kKmihOZjJ2V4utcU+274+bnQ=
github.com/speakeasy-api/speakeasy-client-sdk-go/v3 v3.24.0 h1:Lhzk66xMdSXe/H9EDgzJP5NVynyCKzcYs1vZTmzciD4=
github.com/speakeasy-api/speakeasy-client-sdk-go/v3 v3.24.0/go.mod h1:k9JD6Rj0+Iizc5COoLZHyRIOGGITpKZ2qBuFFO8SqNI=
github.com/speakeasy-api/speakeasy-core v0.19.6 h1:w0VtRMzQCrFY6XEXdIJlywex8xROvoq5qlg6Acjvohg=
github.com/speakeasy-api/speakeasy-core v0.19.6/go.mod h1:M3ZBHTexZINVbpcz+nIEoaFw4Ti0Gc1rnZbdQjiFlaA=
github.com/speakeasy-api/speakeasy-go-sdk v1.8.1 h1:atzohw12oQ5ipaLb1q7ntTu4vvAgKDJsrvaUoOu6sw0=
github.com/speakeasy-api/speakeasy-go-sdk v1.8.1/go.mod h1:XbzaM0sMjj8bGooz/uEtNkOh1FQiJK7RFuNG3LPBSAU=
github.com/speakeasy-api/speakeasy-proxy v0.0.2 h1:u4rQ8lXvuYRCSxiLQGb5JxkZRwNIDlyh+pMFYD6OGjA=
Expand Down
14 changes: 8 additions & 6 deletions internal/studio/studioHelpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,14 @@ func convertSourceResultIntoSourceResponseData(sourceResult run.SourceResult, so
if sourceResult.LintResult != nil {
for _, e := range sourceResult.LintResult.AllErrors {
vErr := vErrs.GetValidationErr(e)
diagnosis = append(diagnosis, components.Diagnostic{
Message: vErr.Message,
Severity: string(vErr.Severity),
Line: pointer.ToInt64(int64(vErr.LineNumber)),
Type: vErr.Rule,
})
if vErr != nil {
diagnosis = append(diagnosis, components.Diagnostic{
Message: vErr.Message,
Severity: string(vErr.Severity),
Line: pointer.ToInt64(int64(vErr.LineNumber)),
Type: vErr.Rule,
})
}
}
}

Expand Down