-
-
Notifications
You must be signed in to change notification settings - Fork 833
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add support for redocly * style fixes * add test for redocly ui * update docs to include redocly * update baseline --------- Co-authored-by: Gabriel Caruana <gabriel@chiliz.com> Co-authored-by: DjordyKoert <djordy.koert@yoursurprise.com>
- Loading branch information
1 parent
daadb0b
commit 2b5d3bd
Showing
13 changed files
with
1,952 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
|
||
namespace Nelmio\ApiDocBundle\Render\Html; | ||
|
||
class Renderer | ||
{ | ||
public const REDOCLY = 'redocly'; | ||
public const SWAGGERUI = 'swaggerui'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
'use strict'; | ||
|
||
window.onload = () => { | ||
const data = JSON.parse(document.getElementById('swagger-data').innerText); | ||
|
||
Redoc.init(data.spec, {}, document.getElementById('swagger-ui')); | ||
}; |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
{% block meta %} | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"/> | ||
{% endblock meta %} | ||
<title>{% block title %}{{ swagger_data.spec.info.title }}{% endblock title %}</title> | ||
|
||
{% block stylesheets %} | ||
<link | ||
href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" | ||
rel="stylesheet" | ||
/> | ||
<style> | ||
body { | ||
margin: 0; | ||
padding: 0; | ||
} | ||
</style> | ||
{% endblock stylesheets %} | ||
|
||
{% block swagger_data %} | ||
{# json_encode(65) is for JSON_UNESCAPED_SLASHES|JSON_HEX_TAG to avoid JS XSS #} | ||
<script id="swagger-data" type="application/json">{{ swagger_data|json_encode(65)|raw }}</script> | ||
{% endblock swagger_data %} | ||
</head> | ||
<body> | ||
{% block swagger_ui %} | ||
<div id="swagger-ui"></div> | ||
{% endblock %} | ||
|
||
{% block javascripts %} | ||
{{ nelmioAsset(assets_mode, 'redocly/redoc.standalone.js') }} | ||
{% endblock javascripts %} | ||
|
||
{{ nelmioAsset(assets_mode, 'init-redocly-ui.js') }} | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters