Added Swagger
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
import { expectNoErrors } from "../validate-helper.js"
|
||||
|
||||
describe("editor bug #1817 - path parameter semantic error with TRACE", function() {
|
||||
it("should return no problems for a path parameter defined in a Swagger 2 TRACE operation", function () {
|
||||
const spec = {
|
||||
swagger: "2.0",
|
||||
paths: {
|
||||
"/CoolPath/{id}": {
|
||||
trace: {
|
||||
parameters: [
|
||||
{
|
||||
name: "id",
|
||||
in: "path",
|
||||
required: true,
|
||||
schema: {
|
||||
type: "string"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return expectNoErrors(spec)
|
||||
})
|
||||
it("should return no problems for a path parameter defined in an OpenAPI 3 TRACE operation", function () {
|
||||
const spec = {
|
||||
openapi: "3.0.0",
|
||||
paths: {
|
||||
"/CoolPath/{id}": {
|
||||
trace: {
|
||||
parameters: [
|
||||
{
|
||||
name: "id",
|
||||
in: "path",
|
||||
required: true,
|
||||
schema: {
|
||||
type: "string"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return expectNoErrors(spec)
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user