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..

I'm just playing around with the GLUE Api. It seems that the API documented here

UPDV9V3ST
UPDV9V3ST Posts: 21 🧑🏻‍🚀 - Cadet

I'm just playing around with the GLUE Api. It seems that the API documented here https://documentation.spryker.com/glue_rest_api/rest-api-reference.htm is not consistent with what I get from my local installation. Is there a way to get the API documentation of the local installation? For example with spring boot applications and swagger ui the API is accessible through http://localhost:8080/your-app-root/swagger-ui.html.

Comments

  • Valerii Trots
    Valerii Trots SRE @ Spryker Sprykee Posts: 1,654 ✨ - Novice

    Are you running docker or vagrant devvm?

  • UPDV9V3ST
    UPDV9V3ST Posts: 21 🧑🏻‍🚀 - Cadet

    Docker

  • Valerii Trots
    Valerii Trots SRE @ Spryker Sprykee Posts: 1,654 ✨ - Novice

    Using latest master of spryker/docker-sdk it should be possible to open <https://swagger.spryker.local/>.

  • Valerii Trots
    Valerii Trots SRE @ Spryker Sprykee Posts: 1,654 ✨ - Novice
    edited November 2019

    Also to generate actual swagger info you need to run docker/sdk cli console rest-api:generate:documentation.

  • Valerii Trots
    Valerii Trots SRE @ Spryker Sprykee Posts: 1,654 ✨ - Novice

    Check that you have

    services:
        swagger:
            engine: swagger-ui
            endpoints:
                swagger.spryker.local:
    

    in your deploy.dev.yml

    and corresponding host in /etc/hosts like

    127.0.0.1 zed.de.spryker.local yves.de.spryker.local glue.de.spryker.local zed.at.spryker.local yves.at.spryker.local glue.at.spryker.local zed.us.spryker.local yves.us.spryker.local glue.us.spryker.local mail.spryker.local scheduler.spryker.local queue.spryker.local swagger.spryker.local
    
  • UPDV9V3ST
    UPDV9V3ST Posts: 21 🧑🏻‍🚀 - Cadet

    Thanks! I'll give it a try...

  • UPDV9V3ST
    UPDV9V3ST Posts: 21 🧑🏻‍🚀 - Cadet

    When I try to generate the documentation I get this:
    *** DEVELOPMENT MODE
    Store: DE369 | Environment: docker
    This command intended to be used non production environment only!

  • Valerii Trots
    Valerii Trots SRE @ Spryker Sprykee Posts: 1,654 ✨ - Novice
    edited November 2019

    I don't know why it thinks that your env is not development one, this is a question more for channel, but this behavior is configurable here - \Spryker\Shared\DocumentationGeneratorRestApi\DocumentationGeneratorRestApiConstants::ENABLE_REST_API_DOCUMENTATION_GENERATION

  • UPDV9V3ST
    UPDV9V3ST Posts: 21 🧑🏻‍🚀 - Cadet

    Ok, that helped. The documentation command now runs without the error message. But on swagger.spryker.local/ is still see the default petstore documentation.

  • Valerii Trots
    Valerii Trots SRE @ Spryker Sprykee Posts: 1,654 ✨ - Novice

    What is the difference between what you see in swagger and what you expect to see there? Are some endpoints missing?

  • UPDV9V3ST
    UPDV9V3ST Posts: 21 🧑🏻‍🚀 - Cadet

    It shows the default petstore API documentation. Not the Spryker Glue API.

  • Valerii Trots
    Valerii Trots SRE @ Spryker Sprykee Posts: 1,654 ✨ - Novice

    🤔

  • UPDV9V3ST
    UPDV9V3ST Posts: 21 🧑🏻‍🚀 - Cadet

    That file exists in my project, but the url within the swagger browser does not work

  • Valerii Trots
    Valerii Trots SRE @ Spryker Sprykee Posts: 1,654 ✨ - Novice

    @ULYHPR789 could you look into it when you have time? Maybe I'm missing something.

  • sprymiker
    sprymiker Cloud Platform Architect Sprykee Posts: 781 🧑🏻‍🚀 - Cadet

    @UPDV9V3ST You need to rebuild swagger image to put yml inside. docker/sdk up should rebuild it.