mirror of
				https://github.com/Redocly/redoc.git
				synced 2025-10-31 07:47:29 +03:00 
			
		
		
		
	
							parent
							
								
									10ab7dabc0
								
							
						
					
					
						commit
						355764dcd4
					
				|  | @ -4,7 +4,12 @@ import { IMenuItem } from '../MenuStore'; | ||||||
| import { GroupModel } from './Group.model'; | import { GroupModel } from './Group.model'; | ||||||
| import { SecurityRequirementModel } from './SecurityRequirement'; | import { SecurityRequirementModel } from './SecurityRequirement'; | ||||||
| 
 | 
 | ||||||
| import { OpenAPIExternalDocumentation, OpenAPIServer, OpenAPIXCodeSample } from '../../types'; | import { | ||||||
|  |   OpenAPIExternalDocumentation, | ||||||
|  |   OpenAPIPath, | ||||||
|  |   OpenAPIServer, | ||||||
|  |   OpenAPIXCodeSample, | ||||||
|  | } from '../../types'; | ||||||
| 
 | 
 | ||||||
| import { | import { | ||||||
|   getOperationSummary, |   getOperationSummary, | ||||||
|  | @ -83,9 +88,14 @@ export class OperationModel implements IMenuItem { | ||||||
|     this.operationId = operationSpec.operationId; |     this.operationId = operationSpec.operationId; | ||||||
|     this.codeSamples = operationSpec['x-code-samples'] || []; |     this.codeSamples = operationSpec['x-code-samples'] || []; | ||||||
|     this.path = operationSpec.pathName; |     this.path = operationSpec.pathName; | ||||||
|  | 
 | ||||||
|  |     const pathInfo = parser.byRef<OpenAPIPath>( | ||||||
|  |       JsonPointer.compile(['paths', operationSpec.pathName]), | ||||||
|  |     ); | ||||||
|  | 
 | ||||||
|     this.servers = normalizeServers( |     this.servers = normalizeServers( | ||||||
|       parser.specUrl, |       parser.specUrl, | ||||||
|       operationSpec.servers || parser.spec.servers || [], |       operationSpec.servers || (pathInfo && pathInfo.servers) || parser.spec.servers || [], | ||||||
|     ); |     ); | ||||||
| 
 | 
 | ||||||
|     this.security = (operationSpec.security || parser.spec.security || []).map( |     this.security = (operationSpec.security || parser.spec.security || []).map( | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user