Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

Commit

Permalink
Add dedicated example swagger file to show markdown in excerpts
Browse files Browse the repository at this point in the history
  • Loading branch information
domharrington committed Nov 30, 2018
1 parent 5ce5e40 commit b39336f
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 3 deletions.
38 changes: 38 additions & 0 deletions example/swagger-files/excerpt-markdown.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"openapi": "3.0.0",
"servers": [
{
"url": "https://httpbin.org"
}
],
"info": {
"title": "response schemas",
"version": "1.0"
},
"paths": {
"/anything/markdown": {
"get": {
"summary": "Markdown in Excerpt",
"description": "# Markdown"
}
},
"/anything/html": {
"get": {
"summary": "HTML in Excerpt",
"description": "<h3>This is HTML</h3>"
}
},
"/anything/mixed": {
"get": {
"summary": "HTML/Markdown in Excerpt",
"description": "#### markdown \n<p>html</p> "
}
},
"/anything/escaping": {
"get": {
"summary": "Escaping bad HTML",
"description": "<img src=\"x\" onerror=\"alert('charlie')\">"
}
}
}
}
3 changes: 0 additions & 3 deletions example/swagger-files/response-schemas.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"/anything/array-of-primitives": {
"get": {
"summary": "Array of primitives",
"description": "sadf<h1>this is a paragraph</h1> <img src=\"x\" onerror=\"alert('charlie')\"> Test \n > this is markdown",
"responses": {
"200": {
"description": "OK",
Expand All @@ -34,7 +33,6 @@
"/anything/object": {
"get": {
"summary": "Object",
"description": "<h3>this is a paragraph</h3>",
"responses": {
"200": {
"description": "OK",
Expand All @@ -52,7 +50,6 @@
"/anything/array-of-objects": {
"get": {
"summary": "Array of objects",
"description": "Test \n > this is markdown",
"responses": {
"200": {
"description": "OK",
Expand Down

0 comments on commit b39336f

Please sign in to comment.