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

REST API: clean up for consistency #522

Open
17 of 20 tasks
julie-sullivan opened this issue Jan 22, 2020 · 7 comments
Open
17 of 20 tasks

REST API: clean up for consistency #522

julie-sullivan opened this issue Jan 22, 2020 · 7 comments
Assignees
Milestone

Comments

@julie-sullivan
Copy link
Contributor

julie-sullivan commented Jan 22, 2020

Some of these are for discussion:

@julie-sullivan julie-sullivan added this to the v5.0.0 milestone Jan 22, 2020
@julie-sullivan julie-sullivan self-assigned this Jan 22, 2020
@julie-sullivan julie-sullivan added the in progress work in progress, under active development label Jan 22, 2020
@julie-sullivan
Copy link
Contributor Author

There are several classes that don't seem to be in use:

  • Dot server
  • Pathway
  • Protein interactions
  • Phenotype
  • MiRNAGene
  • MiRNAMature
  • Utils

Can we delete? If we need to restore we can revive via git.

@julie-sullivan
Copy link
Contributor Author

Caused by: java.lang.NumberFormatException: For input string: "a"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
	at java.lang.Integer.parseInt(Integer.java:580)
	at java.lang.Integer.valueOf(Integer.java:766)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.glassfish.jersey.server.internal.inject.PrimitiveValueOfExtractor.getValue(PrimitiveValueOfExtractor.java:74)
	at org.glassfish.jersey.server.internal.inject.PrimitiveValueOfExtractor.extract(PrimitiveValueOfExtractor.java:91)
	at org.glassfish.jersey.server.internal.inject.QueryParamValueParamProvider$QueryParamValueProvider.apply(QueryParamValueParamProvider.java:78)
	... 72 more

@julie-sullivan
Copy link
Contributor Author

Instead of " Please note that this parameter may not be enabled for all web services." only have valid web services for each end point.

This will cause duplication in the code however.

julie-sullivan added a commit that referenced this issue Jan 24, 2020
julie-sullivan added a commit that referenced this issue Jan 24, 2020
… is 10 and default skip is 0. CamelCase instead of snake_case. #522
julie-sullivan added a commit that referenced this issue Feb 3, 2020
@julie-sullivan
Copy link
Contributor Author

http://bioinfo.hpc.cam.ac.uk/cellbase/webservices/#!/TFBS/getAllByTfbs

I'm having trouble with the cellType parameter.

  • has no description. What should it be? "Type of cell, e.g. K562 or HepG2"
  • it doesn't seem to work. The query outcome is the same, regardless of what I put in that field.

@julie-sullivan
Copy link
Contributor Author

julie-sullivan commented Feb 4, 2020

param /info /search "redundant" path queries, e.g. gene/{id}/protein distinct queries /model /sequence
exclude/include/sort - - -
count - - - -
limit,skip - - - -

julie-sullivan added a commit that referenced this issue Feb 4, 2020
julie-sullivan added a commit that referenced this issue Feb 4, 2020
…es the standard pattern. remove merge param. change pathparam geneId to be genes. rename snp to be variant. #522
julie-sullivan added a commit that referenced this issue Feb 5, 2020
julie-sullivan added a commit that referenced this issue Feb 6, 2020
@julie-sullivan julie-sullivan added enhancement and removed in progress work in progress, under active development labels Feb 10, 2020
julie-sullivan added a commit that referenced this issue Feb 10, 2020
@julie-sullivan
Copy link
Contributor Author

If I include fields and don't explicitly mention id I get a null pointer exception:

2020-02-10 11:31:03 [qtp1127224355-9] INFO  connection:71 - Opened connection [connectionId{localValue:12, serverValue:2728}] to localhost:27017
java.lang.NullPointerException
	at org.opencb.cellbase.server.rest.feature.IdWSServer.getByFeatureIdInfo(IdWSServer.java:99)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

id is assumed to be present:

            List<CellBaseDataResult<Document>> dbNameList = xRefDBAdaptor.nativeGet(queries, queryOptions);
            for (int i = 0; i < dbNameList.size(); i++) {
                dbNameList.get(i).setId(list.get(i));
                for (Document document : dbNameList.get(i).getResults()) {
                    if (document.get("id").equals(list.get(i))) {

Therefore I removed include as the user shouldn't be changing this. See 1eddb92

@julie-sullivan
Copy link
Contributor Author

The API description parameter is deprecated.

If you set the description properly using tags, it shows up in swagger like:

api-description

I think it makes the API harder to read.

@SwaggerDefinition(tags = {
        @Tag(name = "Species", description = "Species RESTful Web Services API")
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant