diff --git a/src/core/components/model-example.jsx b/src/core/components/model-example.jsx
index 499da2de0a5..2a7973b2e69 100644
--- a/src/core/components/model-example.jsx
+++ b/src/core/components/model-example.jsx
@@ -44,13 +44,17 @@ export default class ModelExample extends React.Component {
let { defaultModelExpandDepth } = getConfigs()
const ModelWrapper = getComponent("ModelWrapper")
+ let isOAS3 = specSelectors.isOAS3()
+
return
diff --git a/test/e2e-cypress/tests/bugs/swos-63.js b/test/e2e-cypress/tests/bugs/swos-63.js
index e7c6ddef4b9..77dbdf03f2d 100644
--- a/test/e2e-cypress/tests/bugs/swos-63.js
+++ b/test/e2e-cypress/tests/bugs/swos-63.js
@@ -1,14 +1,35 @@
-describe("SWOS-63: Schema/Model section labeling", () => {
- it("should render `Schemas` for OpenAPI 3", () => {
- cy
- .visit("/?url=/documents/petstore-expanded.openapi.yaml")
- .get("section.models > h4")
- .contains("Schemas")
+describe("SWOS-63: Schema/Model labeling", () => {
+ describe("SchemaS/Models section", () => {
+ it("should render `Schemas` for OpenAPI 3", () => {
+ cy
+ .visit("/?url=/documents/petstore-expanded.openapi.yaml")
+ .get("section.models > h4")
+ .contains("Schemas")
+ })
+ it("should render `Models` for OpenAPI 2", () => {
+ cy
+ .visit("/?url=/documents/petstore.swagger.yaml")
+ .get("section.models > h4")
+ .contains("Models")
+ })
})
- it("should render `Models` for OpenAPI 2", () => {
- cy
- .visit("/?url=/documents/petstore.swagger.yaml")
- .get("section.models > h4")
- .contains("Models")
+ describe("ModelExample within Operation", () => {
+ it("should render `Schemas` for OpenAPI 3", () => {
+ cy
+ .visit("/?url=/documents/petstore-expanded.openapi.yaml")
+ .get("#operations-default-findPets")
+ .click()
+ .get("a.tablinks[data-name=model]")
+ .contains("Schema")
+ })
+ it("should render `Models` for OpenAPI 2", () => {
+ cy
+ .visit("/?url=/documents/petstore.swagger.yaml")
+ .get("section.models > h4")
+ .get("#operations-pet-addPet")
+ .click()
+ .get("a.tablinks[data-name=model]")
+ .contains("Model")
+ })
})
})