Skip to content

Commit 87962e9

Browse files
committed
ran go fmt
things were messed up! added a test to cover rolodex fix.
1 parent f41a539 commit 87962e9

34 files changed

Lines changed: 267 additions & 198 deletions

bundler/bundler_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2319,8 +2319,8 @@ func TestCopySchemaToComponents_NameCollision(t *testing.T) {
23192319
func TestCalculateCollisionNameInline_NumericSuffix(t *testing.T) {
23202320
// Test: When filename-based name also collides, use numeric suffix
23212321
existingNames := map[string]bool{
2322-
"Cat": true,
2323-
"Cat__external": true, // Filename-based collision also exists
2322+
"Cat": true,
2323+
"Cat__external": true, // Filename-based collision also exists
23242324
"Cat__external__1": true, // First numeric suffix also taken (format: name__basename__N)
23252325
}
23262326

bundler/origin_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -914,7 +914,7 @@ func TestCaptureOrigin_FullCoverage(t *testing.T) {
914914
pr := &processRef{
915915
ref: &index.Reference{
916916
FullDefinition: "test.yaml",
917-
Node: &yaml.Node{Line: 5, Column: 2},
917+
Node: &yaml.Node{Line: 5, Column: 2},
918918
},
919919
idx: &index.SpecIndex{},
920920
originalName: "Test",

datamodel/high/base/dynamic_value.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ import (
2222
//
2323
// The N value indicates which value is set (0 = A, 1 == B), preventing the need to check both values.
2424
type DynamicValue[A any, B any] struct {
25-
N int // 0 == A, 1 == B
26-
A A
27-
B B
28-
inline bool
29-
renderCtx any // Context for inline rendering (typed as any to avoid import cycles)
25+
N int // 0 == A, 1 == B
26+
A A
27+
B B
28+
inline bool
29+
renderCtx any // Context for inline rendering (typed as any to avoid import cycles)
3030
}
3131

3232
// IsA will return true if the 'A' or left value is set.

datamodel/high/overlay/action.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ import (
1313
// Action represents a high-level Overlay Action Object.
1414
// https://spec.openapis.org/overlay/v1.1.0#action-object
1515
type Action struct {
16-
Target string `json:"target,omitempty" yaml:"target,omitempty"`
17-
Description string `json:"description,omitempty" yaml:"description,omitempty"`
18-
Update *yaml.Node `json:"update,omitempty" yaml:"update,omitempty"`
19-
Remove bool `json:"remove,omitempty" yaml:"remove,omitempty"`
20-
Copy string `json:"copy,omitempty" yaml:"copy,omitempty"`
16+
Target string `json:"target,omitempty" yaml:"target,omitempty"`
17+
Description string `json:"description,omitempty" yaml:"description,omitempty"`
18+
Update *yaml.Node `json:"update,omitempty" yaml:"update,omitempty"`
19+
Remove bool `json:"remove,omitempty" yaml:"remove,omitempty"`
20+
Copy string `json:"copy,omitempty" yaml:"copy,omitempty"`
2121
Extensions *orderedmap.Map[string, *yaml.Node] `json:"-" yaml:"-"`
2222
low *low.Action
2323
}

datamodel/high/overlay/info.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ import (
1313
// Info represents a high-level Overlay Info Object.
1414
// https://spec.openapis.org/overlay/v1.1.0#info-object
1515
type Info struct {
16-
Title string `json:"title,omitempty" yaml:"title,omitempty"`
17-
Version string `json:"version,omitempty" yaml:"version,omitempty"`
18-
Description string `json:"description,omitempty" yaml:"description,omitempty"`
16+
Title string `json:"title,omitempty" yaml:"title,omitempty"`
17+
Version string `json:"version,omitempty" yaml:"version,omitempty"`
18+
Description string `json:"description,omitempty" yaml:"description,omitempty"`
1919
Extensions *orderedmap.Map[string, *yaml.Node] `json:"-" yaml:"-"`
2020
low *low.Info
2121
}

datamodel/high/overlay/overlay.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ import (
1313
// Overlay represents a high-level OpenAPI Overlay document.
1414
// https://spec.openapis.org/overlay/v1.0.0
1515
type Overlay struct {
16-
Overlay string `json:"overlay,omitempty" yaml:"overlay,omitempty"`
17-
Info *Info `json:"info,omitempty" yaml:"info,omitempty"`
18-
Extends string `json:"extends,omitempty" yaml:"extends,omitempty"`
19-
Actions []*Action `json:"actions,omitempty" yaml:"actions,omitempty"`
16+
Overlay string `json:"overlay,omitempty" yaml:"overlay,omitempty"`
17+
Info *Info `json:"info,omitempty" yaml:"info,omitempty"`
18+
Extends string `json:"extends,omitempty" yaml:"extends,omitempty"`
19+
Actions []*Action `json:"actions,omitempty" yaml:"actions,omitempty"`
2020
Extensions *orderedmap.Map[string, *yaml.Node] `json:"-" yaml:"-"`
2121
low *low.Overlay
2222
}

datamodel/high/v3/request_body_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,4 +320,3 @@ paths: {}`
320320
assert.NoError(t, err)
321321
assert.NotNil(t, result)
322322
}
323-

datamodel/high/v3/security_scheme_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ func TestSecurityScheme_MarshalYAMLInlineWithContext_Reference(t *testing.T) {
157157
assert.Equal(t, "$ref", yamlNode.Content[0].Value)
158158
}
159159

160-
161160
func TestBuildLowSecurityScheme_Success(t *testing.T) {
162161
yml := `type: apiKey
163162
name: X-API-Key

datamodel/high/v3/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
// Server represents a high-level OpenAPI 3+ Server object, that is backed by a low level one.
1515
// - https://spec.openapis.org/oas/v3.1.0#server-object
1616
type Server struct {
17-
Name string `json:"name,omitempty" yaml:"name,omitempty"` // OpenAPI 3.2+ name field for documentation
17+
Name string `json:"name,omitempty" yaml:"name,omitempty"` // OpenAPI 3.2+ name field for documentation
1818
URL string `json:"url,omitempty" yaml:"url,omitempty"`
1919
Description string `json:"description,omitempty" yaml:"description,omitempty"`
2020
Variables *orderedmap.Map[string, *ServerVariable] `json:"variables,omitempty" yaml:"variables,omitempty"`

datamodel/low/v3/security_scheme.go

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,21 @@ import (
2525
// Recommended for most use case is Authorization Code Grant flow with PKCE.
2626
// - https://spec.openapis.org/oas/v3.1.0#security-scheme-object
2727
type SecurityScheme struct {
28-
Type low.NodeReference[string]
29-
Description low.NodeReference[string]
30-
Name low.NodeReference[string]
31-
In low.NodeReference[string]
32-
Scheme low.NodeReference[string]
33-
BearerFormat low.NodeReference[string]
34-
Flows low.NodeReference[*OAuthFlows]
35-
OpenIdConnectUrl low.NodeReference[string]
28+
Type low.NodeReference[string]
29+
Description low.NodeReference[string]
30+
Name low.NodeReference[string]
31+
In low.NodeReference[string]
32+
Scheme low.NodeReference[string]
33+
BearerFormat low.NodeReference[string]
34+
Flows low.NodeReference[*OAuthFlows]
35+
OpenIdConnectUrl low.NodeReference[string]
3636
OAuth2MetadataUrl low.NodeReference[string] // OpenAPI 3.2+ OAuth2 metadata URL
37-
Deprecated low.NodeReference[bool] // OpenAPI 3.2+ deprecated flag
38-
Extensions *orderedmap.Map[low.KeyReference[string], low.ValueReference[*yaml.Node]]
39-
KeyNode *yaml.Node
40-
RootNode *yaml.Node
41-
index *index.SpecIndex
42-
context context.Context
37+
Deprecated low.NodeReference[bool] // OpenAPI 3.2+ deprecated flag
38+
Extensions *orderedmap.Map[low.KeyReference[string], low.ValueReference[*yaml.Node]]
39+
KeyNode *yaml.Node
40+
RootNode *yaml.Node
41+
index *index.SpecIndex
42+
context context.Context
4343
*low.Reference
4444
low.NodeMap
4545
}

0 commit comments

Comments
 (0)