public PathsProcessor(ResolverCache cache, Swagger swagger, SwaggerResolver.Settings settings) { this.swagger = swagger; this.cache = cache; this.settings = settings; parameterProcessor = new ParameterProcessor(cache, swagger); operationProcessor = new OperationProcessor(cache, swagger); }
public Swagger resolve() { if (swagger == null) { return null; } pathProcessor.processPaths(); definitionsProcessor.processDefinitions(); if(swagger.getPaths() != null) { for(String pathname : swagger.getPaths().keySet()) { Path path = swagger.getPaths().get(pathname); if(path.getOperations() != null) { for(Operation operation : path.getOperations()) { operationsProcessor.processOperation(operation); } } } } return swagger; }
operationProcessor.processOperation(operation);
public SwaggerResolver(Swagger swagger, List<AuthorizationValue> auths, String parentFileLocation, Settings settings) { this.swagger = swagger; this.settings = settings != null ? settings : new Settings(); this.cache = new ResolverCache(swagger, auths, parentFileLocation); definitionsProcessor = new DefinitionsProcessor(cache, swagger); pathProcessor = new PathsProcessor(cache, swagger, this.settings); operationsProcessor = new OperationProcessor(cache, swagger); }