fix: gracefully handle non-string operation summaries (via #5189)

This commit is contained in:
kyle
2019-02-19 15:41:16 -08:00
committed by GitHub
parent 85d82fc0a8
commit d9f460f4a8
4 changed files with 128 additions and 80 deletions

View File

@@ -0,0 +1,17 @@
openapi: 3.0.0
servers: []
info:
description: sdf
version: "1.0.0"
title: Swagger Petstore
paths:
/pet:
get:
tags:
- pet
summary:
$ref:
operationId: addPet
responses:
'405':
description: Invalid input

View File

@@ -0,0 +1,10 @@
describe("#5188: non-string operation summary value", () => {
it("should gracefully handle an object value for an operation summary", () => {
cy
.visit("?url=/documents/bugs/5188.yaml")
.get("#operations-pet-addPet")
.click()
.get(".opblock-summary-description")
.contains("[object Object]")
})
})