mirror of
https://github.com/rancher/norman.git
synced 2025-09-09 02:59:19 +00:00
Change RequestHandler signature
This commit is contained in:
@@ -16,7 +16,12 @@ func addSchemasHeader(apiContext *types.APIContext) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
apiContext.Response.Header().Set("X-Api-Schemas", apiContext.URLBuilder.Collection(schema, apiContext.Version))
|
||||
version := apiContext.SchemasVersion
|
||||
if version == nil {
|
||||
version = apiContext.Version
|
||||
}
|
||||
|
||||
apiContext.Response.Header().Set("X-Api-Schemas", apiContext.URLBuilder.Collection(schema, version))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user