diff options
author | Marek Gradzki <mgradzki@cisco.com> | 2017-07-27 08:46:31 +0200 |
---|---|---|
committer | Marek Gradzki <mgradzki@cisco.com> | 2017-07-27 08:46:31 +0200 |
commit | 292114ab202ad4a3997418ad696b443825587451 (patch) | |
tree | 971d70cdd6e9feda8a44f11edb9aa6ab1944a86a /vpp-integration | |
parent | 851edeb9c62f59ce62d0f1b6dd6ac8ecc389b16b (diff) |
Api docs: use project-vpp-version as defioned in release-notes
Change-Id: I4fb38506dc0090f703a23eb65c0518981929284d
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'vpp-integration')
3 files changed, 6 insertions, 7 deletions
diff --git a/vpp-integration/api-docs/core/src/main/java/io/fd/hc2vpp/docs/core/CoverageGenerator.java b/vpp-integration/api-docs/core/src/main/java/io/fd/hc2vpp/docs/core/CoverageGenerator.java index ff6c9b78b..bc94a74cb 100644 --- a/vpp-integration/api-docs/core/src/main/java/io/fd/hc2vpp/docs/core/CoverageGenerator.java +++ b/vpp-integration/api-docs/core/src/main/java/io/fd/hc2vpp/docs/core/CoverageGenerator.java @@ -54,7 +54,6 @@ public class CoverageGenerator implements VppApiUtils { } public PluginCoverage generateConfigCoverage(final Class<?> pluginClass, - final String version, final List<Module> scannedModules, final YangTypeLinkIndex yangTypeIndex, final ClassPathTypeIndex classPathIndex) { @@ -90,7 +89,7 @@ public class CoverageGenerator implements VppApiUtils { final CoverageUnit.CoverageUnitBuilder builder = new CoverageUnit.CoverageUnitBuilder(); // binds vpp api name and generateLink bind with version - builder.setVppApi(fromJvppApi(version, jvppMethodName)); + builder.setVppApi(fromJvppApi(jvppMethodName)); //binds java api reference builder.setJavaApi(new JavaApiMessage(jvppMethodName)); diff --git a/vpp-integration/api-docs/core/src/main/java/io/fd/hc2vpp/docs/core/VppApiUtils.java b/vpp-integration/api-docs/core/src/main/java/io/fd/hc2vpp/docs/core/VppApiUtils.java index c978abae5..d510221e8 100644 --- a/vpp-integration/api-docs/core/src/main/java/io/fd/hc2vpp/docs/core/VppApiUtils.java +++ b/vpp-integration/api-docs/core/src/main/java/io/fd/hc2vpp/docs/core/VppApiUtils.java @@ -22,18 +22,18 @@ import io.fd.hc2vpp.docs.api.VppApiMessage; public interface VppApiUtils { - static String generateVppApiDocLink(final String version, final String vppMessageName) { + static String generateVppApiDocLink(final String vppMessageName) { //https://docs.fd.io/vpp/17.07/d9/d1d/structvl__api__create__subif__t.html // links are using double underscore //final String doubleUnderscoreApiName = vppApi.replace("_", "__"); //return format("https://docs.fd.io/vpp/%s/d9/d1d/structvl__api__%s__t.html", version, doubleUnderscoreApiName); // FIXME - generateLink has dynamic part that can be resolved from api name - return "https://docs.fd.io/vpp/17.07/annotated.html"; + return "https://docs.fd.io/vpp/{project-vpp-version}/annotated.html"; } - default VppApiMessage fromJvppApi(final String version, final String jvppMethodName) { + default VppApiMessage fromJvppApi(final String jvppMethodName) { final String vppMessageName = CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, jvppMethodName); - return new VppApiMessage(vppMessageName, generateVppApiDocLink(version, vppMessageName)); + return new VppApiMessage(vppMessageName, generateVppApiDocLink(vppMessageName)); } } diff --git a/vpp-integration/api-docs/scripts/src/main/groovy/io/fd/hc2vpp/docs/scripts/ApiDocsIndexGenerator.groovy b/vpp-integration/api-docs/scripts/src/main/groovy/io/fd/hc2vpp/docs/scripts/ApiDocsIndexGenerator.groovy index 99e41ce75..ae6ebc606 100644 --- a/vpp-integration/api-docs/scripts/src/main/groovy/io/fd/hc2vpp/docs/scripts/ApiDocsIndexGenerator.groovy +++ b/vpp-integration/api-docs/scripts/src/main/groovy/io/fd/hc2vpp/docs/scripts/ApiDocsIndexGenerator.groovy @@ -86,7 +86,7 @@ class ApiDocsIndexGenerator { .forEach { pluginClass -> log.info "Generating mapping for ${pluginClass}" final PluginCoverage configCoverage = new CoverageGenerator() - .generateConfigCoverage(pluginClass, project.version, modules, yangTypeIndex, classPathIndex) + .generateConfigCoverage(pluginClass, modules, yangTypeIndex, classPathIndex) generateJvppCoverageDoc(configCoverage, outPath, log) //TODO operational coverage |