Skip to content

Commit

Permalink
Use schemas that don't come from a file
Browse files Browse the repository at this point in the history
  • Loading branch information
ptodev authored and omissis committed Nov 16, 2024
1 parent 6c2b600 commit 0293bd3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pkg/generator/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@ func (g *Generator) DoFile(fileName string) error {
}
}

return g.addFile(fileName, schema)
return g.AddFile(fileName, schema)
}

func (g *Generator) addFile(fileName string, schema *schemas.Schema) error {
func (g *Generator) AddFile(fileName string, schema *schemas.Schema) error {
o, err := g.findOutputFileForSchemaID(schema.ID)
if err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion pkg/generator/schema_generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func (g *schemaGenerator) generateReferencedType(ref string) (codegen.Type, erro
return nil, fmt.Errorf("could not resolve qualified file name for %s: %w", fileName, qerr)
}

if ferr := g.addFile(qualified, schema); ferr != nil {
if ferr := g.AddFile(qualified, schema); ferr != nil {
return nil, ferr
}

Expand Down

0 comments on commit 0293bd3

Please sign in to comment.