Giter Club home page Giter Club logo

Comments (6)

outofcoffee avatar outofcoffee commented on June 24, 2024 1

Hi @sameer-coder, thank you for reporting this.

There is improved handling of regex routes in Lambda in v3.31.1. Please could you let us know if this resolves the issue?

from imposter.

sameer-coder avatar sameer-coder commented on June 24, 2024 1

Hello,

Thanks for the update. I no longer get a 500 error but now I am facing the same problem mentioned in this open issue

At the moment, Imposter serves the swagger UI at https://domain.com/_spec. But this path is unreachable because of the way routing is setup in API Gateway. The API Gateway only forwards requests to imposter which match a pattern (example- https://domain.com/api/v1)

The endpoints in the OpenAPI spec still work fine because I can specify /api/v1 as the basePath in the imposter config as well as the OpenAPI spec. Imposter handles this perfectly.

Probably we could add an env var to set a basePath for Swagger UI so that the url becomes https://domain.com/<basePath>/_spec

Thanks for the help!

from imposter.

outofcoffee avatar outofcoffee commented on June 24, 2024

Hi @sameer-coder, there were some further fixes required to static asset handling in Lambda to get this working.

These are released in v3.31.2.

from imposter.

sameer-coder avatar sameer-coder commented on June 24, 2024

Thanks @outofcoffee

I will deploy again and report back on the issue

from imposter.

outofcoffee avatar outofcoffee commented on June 24, 2024

Hi @sameer-coder, from v3.32.0 you can set the environment variable IMPOSTER_OPENAPI_SPEC_PATH_PREFIX, to override the default /_spec prefix.

For example:

IMPOSTER_OPENAPI_SPEC_PATH_PREFIX="/api/core-mock/v1/_spec"

...will make the spec UI accessible at http://localhost:8080/api/core-mock/v1/_spec/

from imposter.

sameer-coder avatar sameer-coder commented on June 24, 2024

Amazing! Thank you 🙏

from imposter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.