-
-
Notifications
You must be signed in to change notification settings - Fork 248
Closed
Labels
questionFurther information is requestedFurther information is requested
Description
I'm using the default configuration
config := huma.DefaultConfig("Example API", "1.0.0")
and changed the server url as follows
config.Servers = []*huma.Server{
{URL: "https://api.example.com", Description: "Root URL of the API"},
}This URL is correctly reflected in the generated documentation, both for the example requests and also in the $schema of the response:
However, when requesting the API, the $schema-url is build from ctx.Host() and the listening port, which in my case is localhost:8888
curl -s "https://api.example.com/test | jq | head
{
"$schema": "http://localhost:8888/api/v1/schemas/Test.json",
"data": [
...
]
}Shouldn't the $schema in the responses also use the configured server?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested
