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] We can create pages without type #351

Closed
vdelattre opened this Issue Dec 1, 2016 · 10 comments

Comments

Projects
None yet
3 participants
@vdelattre

vdelattre commented Dec 1, 2016

use docker 1.1.0
In portal, i create an api test, fill only mandatory fields.

in postman, i use get api to have id:
8083/management/apis

i keep id
use get api: 8083/management/apis/f68a7233-9784-4220-8a72-3397840220fd
return OK, status 200
use post pages api: :8083/management/apis/f68a7233-9784-4220-8a72-3397840220fd/pages
body:
{
"name": "produit-doc",
"content": "json",
"source": {
"type": "http-fetcher",
"configuration": {
"url": "http://128.239.252.127:8080/v2/products/docs"
}
},
"configuration": {
"tryItURL": "http://128.239.252.127:8080/v2",
"tryIt": true
}
}

return OK with status 201 and body:
{
"id": "0463176f-6803-42de-a317-6f6803b2de49",
"name": "produit-doc",
"content": "{"basePath":"/v2","paths":{"/products/search":{"get":{"summary":"Search for product ...
[{"name":"Product","description":"Search product"}]}\n",
"order": 1,
"lastContributor": "admin",
"published": false,
"lastModificationDate": 1480606163747,
"contentType": "application/json",
"source": {
"type": "http-fetcher",
"configuration": {
"url": "http://128.239.252.127:8080/v2/products/docs"
}
},
"configuration": {
"tryItURL": "http://128.239.252.127:8080/v2",
"tryIt": true
}
}

if i go to portal in this api document tab, i get popup error with http_status=500
and got the same with api get pages

if i delete pages with return id in creation, return is 204, and portal and get api are OK now

@NicolasGeraud

This comment has been minimized.

Member

NicolasGeraud commented Dec 1, 2016

hi @vdelattre , when you say

if i go to portal in this api document tab, i get popup error with http_status=500

are you in configuration mode (you have clicked on the settings icon) or in view mode ?

@vdelattre

This comment has been minimized.

vdelattre commented Dec 1, 2016

popup is in view mode, but in configuration mode, it's the same

@NicolasGeraud

This comment has been minimized.

Member

NicolasGeraud commented Dec 1, 2016

your documentation is not published. You have to publish it in order to view it.
Do you navigate threw the documentation or do you fill the address bar of your browser ?

@NicolasGeraud

This comment has been minimized.

Member

NicolasGeraud commented Dec 1, 2016

And can you give us your logs form the rest-api container ?

@vdelattre

This comment has been minimized.

vdelattre commented Dec 1, 2016

i retry all
after post, i made put with published to true
but result is the same
in view mode, configuration mode and get pages api, error 500
i don't find any thing in container log, can you explain in which docker and path inside it to find log?

@NicolasGeraud

This comment has been minimized.

Member

NicolasGeraud commented Dec 1, 2016

docker logs -f <MANAGEMENT_API_CONTAINER_NAME>

and retry

@NicolasGeraud

This comment has been minimized.

Member

NicolasGeraud commented Dec 1, 2016

do you provide page type ? I don't see it in your POST

@NicolasGeraud

This comment has been minimized.

Member

NicolasGeraud commented Dec 1, 2016

if not, this is probably the cause of your problem (and it's a bug in the management api because we should not accept unknown page type)

@brasseld brasseld changed the title from Create swagger documentation by api looks OK but get error 500 after to [management-api] Create swagger documentation by api looks OK but get error 500 after Dec 1, 2016

@vdelattre

This comment has been minimized.

vdelattre commented Dec 1, 2016

you right, i forgot type
with type=swagger it's ok

@NicolasGeraud

This comment has been minimized.

Member

NicolasGeraud commented Dec 1, 2016

ok, good.
I rename this issue

@NicolasGeraud NicolasGeraud changed the title from [management-api] Create swagger documentation by api looks OK but get error 500 after to [management-api] We can create pages without type Dec 1, 2016

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

@brasseld brasseld added this to the 1.2.0 milestone Dec 1, 2016

@brasseld brasseld self-assigned this Dec 1, 2016

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

brasseld added a commit to gravitee-io/gravitee-parent that referenced this issue Feb 21, 2018

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