mirror of
				https://github.com/Redocly/redoc.git
				synced 2025-11-04 09:47:31 +03:00 
			
		
		
		
	
		
			
				
	
	
		
			35 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			35 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
<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>
 | 
						|
</ng-template>
 | 
						|
 | 
						|
<tabs *ngIf="xmlSample || textSample; else jsonSnippet">
 | 
						|
  <tab tabTitle="JSON" *ngIf="sample">
 | 
						|
    <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="response-sample" [innerHtml]="xmlSample | prism:'xml'"></pre>
 | 
						|
    </div>
 | 
						|
  </tab>
 | 
						|
  <tab tabTitle="text/plain" *ngIf="textSample">
 | 
						|
    <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="response-sample">{{textSample}}</pre>
 | 
						|
    </div>
 | 
						|
  </tab>
 | 
						|
</tabs>
 |