Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use stable 2.3.1 swagger codgen #179

Merged
merged 1 commit into from
Jan 25, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@ install:

before_script:
- pwd
- wget --no-verbose https://artifacts.oicr.on.ca/artifactory/collab-release/io/swagger/swagger-codegen-cli/2.3.0-SNAPSHOT/swagger-codegen-cli-2.3.0-20170927.194112-1.jar -O swagger-codegen-cli.jar
- wget --no-verbose http://central.maven.org/maven2/io/swagger/swagger-codegen-cli/2.3.1/swagger-codegen-cli-2.3.1.jar -O swagger-codegen-cli.jar
- java -jar swagger-codegen-cli.jar generate -i https://raw.githubusercontent.com/ga4gh/dockstore/${WEBSERVICE_VERSION}/dockstore-webservice/src/main/resources/swagger.yaml -l typescript-angular -o src/app/shared/swagger -c swagger-config.json
- ./script.sh
- psql 'postgres' -U postgres < travisci/db_dump.sql
- java -jar dockstore-webservice-${WEBSERVICE_VERSION}.jar server travisci/web.yml 1>/dev/null &
- 'sleep 20'
Expand Down
13 changes: 0 additions & 13 deletions script.sh

This file was deleted.

2 changes: 1 addition & 1 deletion src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ import { ToolDetailsComponent } from './tool-details/tool-details.component';
ListentryModule,
MarkdownModule.forRoot(),
SearchModule,
ApiModule.forConfig(getApiConfig)
ApiModule.forRoot(getApiConfig)
],
providers: [
{provide: TooltipConfig, useFactory: getTooltipConfig},
Expand Down
2 changes: 1 addition & 1 deletion src/app/container/container.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export class ContainerComponent extends Entry {

// Only get published tool if the URI is for a specific tool (/containers/quay.io%2FA2%2Fb3)
// as opposed to just /tools or /docs etc.
this.containersService.getPublishedContainerByToolPath(this.title, this._toolType)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was an explanation discovered for this disappearing parameter?

Copy link
Contributor Author

@garyluu garyluu Jan 25, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what I think happened.

  1. We were originally not using the swagger generated methods and we had our own method with an extra parameter to differentiate between tool/workflow.
  2. We swapped the methods to the swagger-generated ones but didn't remove that extra parameter during the change. The swagger-generated methods so happen to allow an extra parameter with type 'any'. so it still worked but didn't really do anything significant with that extra parameter.

With the new 2.3.1 swagger generated methods, it appears they removed this 'any' type parameter so it no longer works.

this.containersService.getPublishedContainerByToolPath(this.title)
.subscribe(tool => {
this.containerService.setTool(tool);
this.selectedVersion = this.selectVersion(this.tool.tags, this.urlTag, this.tool.defaultVersion, this.selectedVersion);
Expand Down
4 changes: 2 additions & 2 deletions src/app/shared/image-provider.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export class ImageProviderService {
} else {
console.log('This should not be necessary');
this.containersService.getDockerRegistries().subscribe(registryList => {
return registryList.find(dockerRegistry => dockerRegistry.enum === imageProvider);
return registryList.find(dockerRegistry => dockerRegistry._enum === imageProvider);
});
}
}
Expand Down Expand Up @@ -90,7 +90,7 @@ export class ImageProviderService {
if (!this.dockerRegistryList) {
console.log('This should not be necessary');
this.containersService.getDockerRegistries().subscribe(registryList => {
const dockerReg = registryList.find(x => x.enum === tool.registry);
const dockerReg = registryList.find(x => x._enum === tool.registry);
if (dockerReg) {
return dockerReg.privateOnly === 'true';
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/app/workflow/workflow.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export class WorkflowComponent extends Entry {

// Only get published workflow if the URI is for a specific workflow (/containers/quay.io%2FA2%2Fb3)
// as opposed to just /tools or /docs etc.
this.workflowsService.getPublishedWorkflowByPath(this.title, this._toolType)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

this.workflowsService.getPublishedWorkflowByPath(this.title)
.subscribe(workflow => {
this.workflowService.setWorkflow(workflow);

Expand Down