Skip to content

Schema naming in openapi.json #123

Answered by vearutop
pboguslawski asked this question in Q&A
Discussion options

You must be logged in to vote

This customization can be done with InterceptDefName hook.

	s.OpenAPICollector.Reflector().InterceptDefName(func(t reflect.Type, defaultDefName string) string {
		return strings.ReplaceAll(defaultDefName, "Items", "")
	})

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@pboguslawski
Comment options

Answer selected by pboguslawski
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants