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

2»

Comments

  • sprymiker
    sprymiker Cloud Platform Architect Sprykee Posts: 781 🧑🏻‍🚀 - Cadet
    docker run -p 8080:8080 -e BASE_URL=/swagger -e SWAGGER_JSON=/var/specs/swagger.yml -v $(pwd)/src/Generated/Glue/Specification/spryker_rest_api.schema.yml:/var/specs/swagger.yml swaggerapi/swagger-ui
    
  • sprymiker
    sprymiker Cloud Platform Architect Sprykee Posts: 781 🧑🏻‍🚀 - Cadet

    And open localhost:8080/swagger

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

    I see this

  • giovanni.piemontese
    giovanni.piemontese Technical Lead @ Löffelhardt Spryker Solution Partner Posts: 871 🧑🏻‍🚀 - Cadet

    it works!

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

    And the question. Why it does not work for swagger in docker setup as it is the same?

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

    docker inspect spryker_b2b_dev_swagger_1

  • giovanni.piemontese
    giovanni.piemontese Technical Lead @ Löffelhardt Spryker Solution Partner Posts: 871 🧑🏻‍🚀 - Cadet

    i don't know..
    maybe swagger is expecting swagger.yml file and not spryker_rest_api..... filename... because the mount works in docker setup

  • giovanni.piemontese
    giovanni.piemontese Technical Lead @ Löffelhardt Spryker Solution Partner Posts: 871 🧑🏻‍🚀 - Cadet

    question: it does work on your b2b local docker?

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

    It does not matter you can change swagger.yml with any other name in the command I gave.

  • giovanni.piemontese
    giovanni.piemontese Technical Lead @ Löffelhardt Spryker Solution Partner Posts: 871 🧑🏻‍🚀 - Cadet

    ok..

  • giovanni.piemontese
    giovanni.piemontese Technical Lead @ Löffelhardt Spryker Solution Partner Posts: 871 🧑🏻‍🚀 - Cadet

    strange.. i can debug in deep maybe later or tomorrow and i can ping u if i find smth...

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

    This swagger stuff is so isolated - it does not care on the project. As only mount and env var is set.

  • giovanni.piemontese
    giovanni.piemontese Technical Lead @ Löffelhardt Spryker Solution Partner Posts: 871 🧑🏻‍🚀 - Cadet

    yes i see

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

    docker inspect spryker_b2b_dev_swagger_1 | grep spryker_rest_api

    docker inspect spryker_b2b_dev_swagger_1 | grep SWAGGER_JSON
    
  • sprymiker
    sprymiker Cloud Platform Architect Sprykee Posts: 781 🧑🏻‍🚀 - Cadet

    List the output here please. Thanks

  • giovanni.piemontese
    giovanni.piemontese Technical Lead @ Löffelhardt Spryker Solution Partner Posts: 871 🧑🏻‍🚀 - Cadet

    first command:

    "SWAGGER_JSON=/var/specs/spryker_rest_api.schema.yml",
    

    second command:

    "SWAGGER_JSON=/var/specs/spryker_rest_api.schema.yml",
    
  • sprymiker
    sprymiker Cloud Platform Architect Sprykee Posts: 781 🧑🏻‍🚀 - Cadet

    docker inspect -f '{{ .Mounts }}' spryker_b2b_dev_swagger_1

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

    But as I remember file was there.

  • giovanni.piemontese
    giovanni.piemontese Technical Lead @ Löffelhardt Spryker Solution Partner Posts: 871 🧑🏻‍🚀 - Cadet

    [{bind /Volumes/Loeffelhardt-Projekte/el-online.loeffelhardt.local/project/src/Generated/Glue/Specification /var/specs rw true rprivate}]

  • giovanni.piemontese
    giovanni.piemontese Technical Lead @ Löffelhardt Spryker Solution Partner Posts: 871 🧑🏻‍🚀 - Cadet

    it seem good...

    i will try today by my collegue docker instance... in the case there works then it is only smth strange on my system...

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

    Strange - it must work.

    Ok. Let’s do the reset.

    docker/sdk down
    docker rm spryker_b2b_dev_swagger_1
    docker/sdk run

  • giovanni.piemontese
    giovanni.piemontese Technical Lead @ Löffelhardt Spryker Solution Partner Posts: 871 🧑🏻‍🚀 - Cadet

    ok.. i will try and give u feedback in 1 hour...

  • giovanni.piemontese
    giovanni.piemontese Technical Lead @ Löffelhardt Spryker Solution Partner Posts: 871 🧑🏻‍🚀 - Cadet

    it works now!!

  • giovanni.piemontese
    giovanni.piemontese Technical Lead @ Löffelhardt Spryker Solution Partner Posts: 871 🧑🏻‍🚀 - Cadet

    thank u!

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

    Hmm. It seems swagger just keeps some state internally.

  • giovanni.piemontese
    giovanni.piemontese Technical Lead @ Löffelhardt Spryker Solution Partner Posts: 871 🧑🏻‍🚀 - Cadet

    probably yes...

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

    We are willing to change the behavior completely by introducing Glue endpoint for specification. At that point it won’t go via file but URL.

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

    Thank you for using our docker SDK and feedbacks!

  • giovanni.piemontese
    giovanni.piemontese Technical Lead @ Löffelhardt Spryker Solution Partner Posts: 871 🧑🏻‍🚀 - Cadet

    yes... your docker SDK is very good!! thank u!