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

[management-api] Create an API from a Swagger descriptor results in NullPointerException #168

Closed
lusoalex opened this Issue Jul 25, 2016 · 2 comments

Comments

Projects
None yet
3 participants
@lusoalex

lusoalex commented Jul 25, 2016

Hello,
When i try to import swagger (2.0) json to create a new API, it result in a NullPointerException.

java.lang.NullPointerException: null
    at io.gravitee.management.service.impl.SwaggerServiceImpl.prepare(SwaggerServiceImpl.java:46)

By analyzing my json, i see i do not have "schemes" specified.
So i read the swagger specificiations : http://swagger.io/specification/
I see schemes is not required :

If the schemes is not included, the default scheme to be used is the one used to access the Swagger definition itself.

Now, if we were importing the swagger throught an http/https call, we would take the scheme used to access to the json. But currently, we import it throught an "upload file".

==> Could you manage it by giving the possibility to :

  • import json swagger documentation through a web link (and use the link scheme) or
  • setting "https" as default value when the scheme is not present and json uploaded by file.

Regards,
Alexandre.

@brasseld brasseld changed the title from [Management API] [Swagger] import results in NullPointerException to [management-api] Create an API from a Swagge descriptor results in NullPointerException Jul 26, 2016

@brasseld brasseld changed the title from [management-api] Create an API from a Swagge descriptor results in NullPointerException to [management-api] Create an API from a Swagger descriptor results in NullPointerException Jul 26, 2016

@brasseld

This comment has been minimized.

Member

brasseld commented Jul 26, 2016

Hi @lusoalex,

Please create an other ticket for this enhancement: import json swagger documentation through a web link (and use the link scheme)

Even if it can resolve your issue, this is an enhancement of the import using Swagger feature.

brasseld added a commit to gravitee-io/gravitee-management-rest-api that referenced this issue Jul 26, 2016

@brasseld brasseld self-assigned this Jul 26, 2016

@brasseld brasseld added this to the 0.18.0 milestone Jul 26, 2016

@brasseld

This comment has been minimized.

Member

brasseld commented Jul 26, 2016

Enhancement issue has been created there: #170

brasseld added a commit to gravitee-io/gravitee-management-rest-api that referenced this issue Jul 26, 2016

NicolasGeraud added a commit to gravitee-io/gravitee-management-rest-api that referenced this issue Jul 27, 2016

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