-
-
Notifications
You must be signed in to change notification settings - Fork 328
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Support TryItOut and logo in rapi-doc external view * Add Stoplight `elements` external view * Allow passing of custom HTML attributes to external UIs * Fix config:diff
- Loading branch information
Showing
6 changed files
with
82 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<!-- See https://github.com/stoplightio/elements/blob/main/docs/getting-started/elements/elements-options.md for config --> | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | ||
<title>Elements in HTML</title> | ||
<!-- Embed elements Elements via Web Component --> | ||
<script src="https://unpkg.com/@stoplight/elements/web-components.min.js"></script> | ||
<link rel="stylesheet" href="https://unpkg.com/@stoplight/elements/styles.min.css"> | ||
</head> | ||
<body> | ||
|
||
<elements-api | ||
@foreach($htmlAttributes as $attribute => $value) | ||
{{-- Attributes specified first override later ones --}} | ||
{!! $attribute !!}="{!! $value !!}" | ||
@endforeach | ||
apiDescriptionUrl="{!! $metadata['openapi_spec_url'] !!}" | ||
router="hash" | ||
layout="sidebar" | ||
hideTryIt="{!! ($tryItOut['enabled'] ?? true) ? '' : 'true'!!}" | ||
logo="{!! $metadata['logo'] !!}" | ||
/> | ||
|
||
</body> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,23 @@ | ||
|
||
<!-- See https://rapidocweb.com/api.html for options --> | ||
<!doctype html> <!-- Important: must specify --> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> <!-- Important: rapi-doc uses utf8 characters --> | ||
<script type="module" src="https://unpkg.com/rapidoc/dist/rapidoc-min.js"></script> | ||
</head> | ||
<body> | ||
<rapi-doc spec-url="{!! $metadata['openapi_spec_url'] !!}" | ||
render-style="read" | ||
> </rapi-doc> | ||
<rapi-doc | ||
@foreach($htmlAttributes as $attribute => $value) | ||
{{-- Attributes specified first override later ones --}} | ||
{!! $attribute !!}="{!! $value !!}" | ||
@endforeach | ||
spec-url="{!! $metadata['openapi_spec_url'] !!}" | ||
render-style="read" | ||
allow-try="{!! ($tryItOut['enabled'] ?? true) ? 'true' : 'false'!!}" | ||
> | ||
@if($metadata['logo']) | ||
<img slot="logo" src="{!! $metadata['logo'] !!}"/> | ||
@endif | ||
</rapi-doc> | ||
</body> | ||
</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