Skip to content

Commit ecb7f91

Browse files
author
Josh Newman
committed
Fix path issue for paths with a period
1 parent 08426a2 commit ecb7f91

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/generator/generator.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,10 @@ func (g *Generator) patchEmptySchemas(fileBytes []byte) ([]byte, error) {
124124
}
125125

126126
for pathKey := range m.Get("paths").ObjxMap() {
127-
pathPath := "paths." + pathKey
127+
pathPath := fmt.Sprintf("paths[%s]", pathKey)
128128

129129
for methodKey := range m.Get(pathPath).ObjxMap() {
130-
methodPath := pathPath + "." + methodKey
130+
methodPath := fmt.Sprintf("%s[%s]", pathPath, methodKey)
131131

132132
schemaKey := fmt.Sprintf("%s.requestBody.content.application/json.schema", methodPath)
133133
schema := m.Get(schemaKey)

0 commit comments

Comments
 (0)