What are the Slack Archives?
It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.
Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..
Hello guys, how can i load in docker under swagger in docker the glue documentation g
Hello guys, how can i load in docker under swagger in docker the glue documentation generated from this command docker/sdk console rest-api:generate:documentation
? I've seen that this command generate the spryker_rest_api.schema.yml
file under src/Generated/Glue/Specification
but me is not clear how to load this definition into swagger... which is the public url, if exists one? thanks!
Comments
-
You can paste it i.e.
http://editor.swagger.io/0 -
Hi Giovanni,
Do you use the feature in docker SDK https://documentation.spryker.com/docs/spryker-in-docker-services#swagger-ui ?
0 -
@ULYHPR789 yes.. i can see the swagger app with my url.. but the problem is that i don't understand how to load the spryker generated documentation into swagger application web..
swagger: engine: swagger-ui endpoints: swagger.<our domain>.com:
0 -
It should be automatically done.
https://github.com/spryker/docker-sdk/blob/master/images/swagger/Dockerfile
Try
docker/sdk up
after generating spec. It should build swagger image again and catch generated yml,0 -
unfortunately it s not happend.... i miss something? i just update docker sdk project and then bootstrap deploy.dev.yml and up
0 -
When have you generated spryker_rest_api.schema.yml? Before up or after?
0 -
ah maybe after... ok.. i can try to re-up docker.. i need only up or maybe before also bootstrap and then up?
0 -
just up. Bootstrap is only needed when SDK updated or deploy yml changed.
0 -
ok. i tried to up again docker (with rest api documentation already generated) but under swagger app there is always the default url about petstore and not the spryker yml... maybe i do something wrong??!
0 -
It should be OOTB.
Would you be so kind to run the following:
docker exec spryker_dev_swagger_1 ls -al /var/specs/
0 -
docker exec spryker_b2b_dev_swagger_1 ls -la /var/specs/ total 228 drwxr-xr-x 2 root root 102 Jan 29 10:16 . drwxrwxrwx 1 root root 4096 Jan 28 10:12 .. -rw-r--r-- 1 root root 227756 Jan 29 10:15 spryker_rest_api.schema.yml
0 -
is there!
0 -
docker exec spryker_b2b_dev_swagger_1 'echo $SWAGGER_JSON'
0 -
with your command i get
OCI runtime exec failed: exec failed: container_linux.go:346: starting container process caused "exec: \"echo $SWAGGER_JSON\": executable file not found in $PATH": unknown
withou single quote, just echo $SWAGGER_JSON then i get empty response from container
0 -
ok.
docker exec -it spryker_b2b_dev_swagger_1 bash
and inside
echo $SWAGGER_JSON
0 -
ok. i wanted just this try.. 1 min
0 -
P.S. And in dev mode you do not need to rebuild swagger image as it just mounts the folder.
0 -
SWAGGER_JSON path variable is also right:
/var/specs/spryker_rest_api.schema.yml
0 -
yes.. understand..
0 -
i checked later..
0 -
So everything is set ok. I wonder if Swagger has cached in browser. Would you able to open it in Private mode?
0 -
ok, i try..
0 -
no.. always the same
0 -
May be permission issue.
0 -
how can we check if a permission issue?
0 -
docker logs spryker_b2b_dev_swagger_1
0 -
no errors in log... only the access log infos
0 -
Are you on linux?
0 -
no, macos
0 -
It seems we are giving everything for swagger UI. Let’s try the following:
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 76 Spryker News
- 929 Developer Corner
- 787 Spryker Development
- 89 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 35 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 26 Job Opportunities
- 3.2K 📜 Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 70 Spryker Safari Questions
- 50 Random