This commit is contained in:
Shreyas Goenka 2024-09-03 20:14:02 +02:00
parent cb8d6a9f60
commit 578019ba22
No known key found for this signature in database
GPG Key ID: 92A07DF49CCB0622
1 changed files with 2 additions and 2 deletions

View File

@ -44,8 +44,8 @@ type constructor struct {
func (c *constructor) Definitions() any {
defs := maps.Clone(c.definitions)
// Remove the root type from the definitions. No need to include it in the
// definitions.
// Remove the root type from the definitions. We don't need to include it in
// the definitions because it will be inlined as the root of the generated JSON schema.
delete(defs, typePath(c.root))
if len(defs) == 0 {