@Override public void process(Object annotation, OperationGenerator operationGenerator) { Path path = (Path) annotation; operationGenerator.setPath(path.value()); } }
protected void correctPath(OperationGenerator operationGenerator) { String path = operationGenerator.getPath(); if (StringUtils.isEmpty(path)) { path = "/"; } operationGenerator.setPath(path); }
protected void processPath(String[] paths, OperationGenerator operationGenerator) { if (null == paths || paths.length == 0) { return; } // swagger仅支持配一个path,否则将会出现重复的operationId if (paths.length > 1) { throw new Error(String.format("not allowed multi path for %s:%s", operationGenerator.getProviderMethod().getDeclaringClass().getName(), operationGenerator.getProviderMethod().getName())); } operationGenerator.setPath(paths[0]); }
protected void correctPath(OperationGenerator operationGenerator) { String path = operationGenerator.getPath(); if (StringUtils.isEmpty(path)) { path = "/" + operationGenerator.getOperation().getOperationId(); } operationGenerator.setPath(path); }
@Override public void process(Object annotation, OperationGenerator operationGenerator) { Path path = (Path) annotation; operationGenerator.setPath(path.value()); } }
protected void correctPath(OperationGenerator operationGenerator) { String path = operationGenerator.getPath(); if (StringUtils.isEmpty(path)) { path = "/"; } operationGenerator.setPath(path); }
protected void processPath(String[] paths, OperationGenerator operationGenerator) { if (null == paths || paths.length == 0) { return; } // swagger仅支持配一个path,否则将会出现重复的operationId if (paths.length > 1) { throw new Error(String.format("not allowed multi path for %s:%s", operationGenerator.getProviderMethod().getDeclaringClass().getName(), operationGenerator.getProviderMethod().getName())); } operationGenerator.setPath(paths[0]); }
protected void correctPath(OperationGenerator operationGenerator) { String path = operationGenerator.getPath(); if (StringUtils.isEmpty(path)) { path = "/" + operationGenerator.getOperation().getOperationId(); } operationGenerator.setPath(path); }