OpenAPI-Specification
OpenAPI-Specification copied to clipboard
empty host causes schema validation failure
should be valid if relative pathing is being used. (I updated swagger-ui to work with relative paths)
{
"level": "error",
"domain": "validation",
"keyword": "pattern",
"message": "ECMA 262 regex \"^[^{}/ :\\\\]+(?::\\d+)?$\" does not match input string \"\"",
"schema": {
"loadingURI": "#",
"pointer": "/properties/host"
},
"instance": {
"pointer": "/host"
}
}
Can you share a small sample to reproduce it?
{
swagger: '2.0',
info: {
title: 'My API',
version: '2.0'
},
host: '',
schemes: [],
basePath: '/api/v2',
consumes: [
'application/json'
],
produces: [
'application/json'
],
paths: ...,
definitions: ...,
parameters: ...,
responses: ...
}
Fine, I should have asked for an addition to the fixtures so I'd be forced to fix it ;) But I'll look into it. Thanks for reporting.
Should be fixed now.