-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: display xml examples if present in response examples
- Loading branch information
1 parent
d2c790f
commit cb106cc
Showing
9 changed files
with
121 additions
and
28 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 |
---|---|---|
|
@@ -64,7 +64,7 @@ header { | |
} | ||
|
||
:host /deep/ tabs ul { | ||
padding-top: 10px; | ||
padding-top: 10px; | ||
} | ||
|
||
.code-sample pre { | ||
|
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 |
---|---|---|
@@ -1,10 +1,26 @@ | ||
<div class="snippet"> | ||
<!-- in case sample is not available for some reason --> | ||
<pre *ngIf="sample == undefined"> Sample unavailable </pre> | ||
<div class="action-buttons"> | ||
<span copy-button [copyText]="sample" class="hint--top-left hint--inversed"> <a>Copy</a> </span> | ||
<span> <a *ngIf="enableButtons" (click)="expandAll()">Expand all</a> </span> | ||
<span> <a *ngIf="enableButtons" (click)="collapseAll()">Collapse all</a> </span> | ||
<ng-template #jsonSnippet> | ||
<div class="snippet"> | ||
<!-- in case sample is not available for some reason --> | ||
<pre *ngIf="sample == undefined"> Sample unavailable </pre> | ||
<div class="action-buttons"> | ||
<span copy-button [copyText]="sample" class="hint--top-left hint--inversed"> <a>Copy</a> </span> | ||
<span> <a *ngIf="enableButtons" (click)="expandAll()">Expand all</a> </span> | ||
<span> <a *ngIf="enableButtons" (click)="collapseAll()">Collapse all</a> </span> | ||
</div> | ||
<pre [innerHtml]="sample | jsonFormatter"></pre> | ||
</div> | ||
<pre [innerHtml]="sample | jsonFormatter"></pre> | ||
</div> | ||
</ng-template> | ||
|
||
<tabs *ngIf="xmlSample; else jsonSnippet"> | ||
<tab tabTitle="JSON"> | ||
<ng-container *ngTemplateOutlet="jsonSnippet"></ng-container> | ||
</tab> | ||
<tab tabTitle="XML" *ngIf="xmlSample"> | ||
<div class="snippet"> | ||
<div class="action-buttons"> | ||
<span copy-button [copyText]="xmlSample" class="hint--top-left hint--inversed"> <a>Copy</a> </span> | ||
</div> | ||
<pre class="xml-sample" [innerHtml]="xmlSample | prism:'xml'"></pre> | ||
</div> | ||
</tab> | ||
</tabs> |
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
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