Skip to content
This repository has been archived by the owner on Feb 28, 2020. It is now read-only.

Commit

Permalink
Merge e48ddb9 into 9bf634c
Browse files Browse the repository at this point in the history
  • Loading branch information
jmeis committed Aug 12, 2019
2 parents 9bf634c + e48ddb9 commit 95c0e01
Show file tree
Hide file tree
Showing 33 changed files with 15 additions and 2,478 deletions.
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ language: java
jdk:
- openjdk10
before_install:
- nvm install 8.9.4
- nvm install 10.16.2
- cd ./generator-java
- npm i -g makeshift && makeshift -r https://registry.npmjs.org
- npm i -g standard-version
Expand All @@ -11,9 +11,9 @@ install:
- npm run install_linked_dependencies
before_script:
- cd /tmp
- wget http://services.gradle.org/distributions/gradle-5.0-bin.zip
- unzip -qq gradle-5.0-bin.zip
- export GRADLE_HOME=/tmp/gradle-5.0
- wget http://services.gradle.org/distributions/gradle-5.5.1-bin.zip
- unzip -qq gradle-5.5.1-bin.zip
- export GRADLE_HOME=/tmp/gradle-5.5.1
- wget https://github.com/github/hub/releases/download/v2.5.1/hub-linux-386-2.5.1.tgz
- tar -xvzf hub-linux-386-2.5.1.tgz
- mv hub-linux-386-2.5.1 hub
Expand Down
8 changes: 8 additions & 0 deletions generator-java/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [5.15.0](https://github.com/ibm-developer/generator-ibm-java/compare/v5.14.3...v5.15.0) (2019-08-12)


### Features

* **sdkgen:** remove api discovery ([ebf649a](https://github.com/ibm-developer/generator-ibm-java/commit/ebf649a))
* **sdkgen:** remove sdkgen ([c272fdc](https://github.com/ibm-developer/generator-ibm-java/commit/c272fdc))

### [5.14.3](https://github.com/ibm-developer/generator-ibm-java/compare/v5.14.2...v5.14.3) (2019-08-08)


Expand Down
25 changes: 1 addition & 24 deletions generator-java/generators/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ const Generator = require('yeoman-generator')
const fspath = require('path')
const fs = require('fs')
const extend = require('extend')
const yml = require('js-yaml')

const Defaults = require('../lib/defaults')
const EnablementContext = require('../lib/enablementContext')
Expand Down Expand Up @@ -155,28 +154,7 @@ module.exports = class extends Generator {
'generator-ibm-cloud-enablement': pkg.dependencies['generator-ibm-cloud-enablement']
}
config.genVersions['generator-ibm-java-' + config.frameworkType] = pkg.dependencies['generator-ibm-java-' + config.frameworkType]
if (config.frameworkType === 'liberty' && config.createType === 'bff/liberty') {
config.enableApiDiscovery = true
}
if (config.frameworkType === 'spring' && config.createType === 'bff/spring') {
const resource = this._loadresource('bff/swagger.yaml');
const bffSwagger = JSON.stringify(yml.safeLoad(resource));
if (config.bluemix) {
if (config.bluemix.openApiServers) {
config.bluemix.openApiServers.push({'spec': bffSwagger})
} else {
config.bluemix.openApiServers = [{'spec': bffSwagger}]
}
} else {
config.bluemix = {
openApiServers: [
{
'spec': bffSwagger
}
]
}
}
}

//configure this generator and then pass that down through the contexts
const control = new Control(fspath.resolve(config.templateRoot, config.createType), config)
this.paths = control.getComposition()
Expand All @@ -193,7 +171,6 @@ module.exports = class extends Generator {
context.conf.addJndiEntries(config.jndiEntries)
}
context.addCompositions(control.getSubComposition(context.id))
context.conf.enableApiDiscovery = config.enableApiDiscovery
})
enablementContexts.forEach(context => {
context.appName = config.appName
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ public class Info {
@EventListener(ApplicationReadyEvent.class)
public void contextRefreshedEvent() {
System.out.println("The following endpoints are available by default :-");
System.out.println(" OpenAPI UI : http://localhost:8080/swagger-ui.html");
System.out.println(" OpenAPI json : http://localhost:8080/swagger/api");
}

}
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{
"excludes" : [
{{#if bluemix.openApiServers}}
"src/main/java/application/SBApplication.java",
{{/if}}
".classpath",
".project"
],
Expand Down
1 change: 0 additions & 1 deletion generator-java/generators/liberty/exports.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ module.exports = {
integrationAsserts : {
technologies : require('./lib/assert.technologies'),
liberty : require('./lib/assert.liberty'),
openapi : require('./lib/assert.openapi')
},
defaults: require('./lib/defaults'),
prompts: [require('./prompts/liberty')]
Expand Down
17 changes: 0 additions & 17 deletions generator-java/generators/liberty/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ const constant = require('./lib/constant')
const Generator = require('yeoman-generator');
const extend = require('extend');
const Defaults = require('./lib/defaults');
const OpenApi = require('./lib/openapi');

const defaults = new Defaults();
const logId = require('../../package.json').name;
Expand All @@ -34,8 +33,6 @@ module.exports = class extends Generator {
this.logger.writeToLog(`${logId}:constructor - context`, JSON.stringify(opts.context));
this.patterns.push('picnmix');
this.conf.addMissing(opts, defaults);
this.openApiDir = [];
this.conf.enableApiDiscovery = this.config.enableApiDiscovery || false;

if (this.options.libertyVersion === 'beta' || opts.context.conf.libertyVersion === 'beta') {
this.conf.libertyBeta = true
Expand All @@ -55,17 +52,6 @@ module.exports = class extends Generator {

configuring() {
this.configure(this);
if (this.conf.technologies.includes('swagger')) {
this.conf.enableApiDiscovery = true;
}
this.openApiDir = [];
if (this.conf.bluemix && this.conf.bluemix.openApiServers && this.conf.bluemix.backendPlatform == 'JAVA') {
this.conf.enableApiDiscovery = true;
return OpenApi.generate(this.conf.bluemix.openApiServers)
.then(dir => {
this.openApiDir = dir;
});
}
}

writing() {
Expand All @@ -75,9 +61,6 @@ module.exports = class extends Generator {
if (this.conf.buildType == 'gradle') {
this.conf.bxBuildCmd = '`gradle build cfPush -PcfOrg=[your email address] -PcfUsername=[your username] -PcfPassword=[your password]`';
}
if (this.openApiDir.length > 0) {
OpenApi.writeFiles(this.openApiDir, this);
}
return this.defaultWriter(this); //use the default writer supplied by the context.
}

Expand Down
53 changes: 0 additions & 53 deletions generator-java/generators/liberty/lib/assert.openapi.js

This file was deleted.

Loading

0 comments on commit 95c0e01

Please sign in to comment.