Forum Discussion

Emperor's avatar
Emperor
Visitor
2 years ago
Solved

Swagger at runtime

Hi, I am new to Swagger. So this is a very basic question. I have defined my APIs using Swagger. The APIs contains request and response objects. I have also uploaded Swagger to my API Gateway. The...
  • chichepo's avatar
    2 years ago

    Emperor Hi

    Your Swagger file is your "application contract" or your "functional specification".
    When you serve the client request, your API Gateway is acting as a API hub where all the API traffic is passing thru.(it checks the access grants as well).
    In addition, it validates the calls and the responses.
    For example, if the client is sending a request to the server with a value that does not fit to the Swagger definition (pattern, enum, nullable etc.) it will raise an error.

    In the same manner, if the server is sending back a response that does not fit to the Swagger definition, it will raise an error.
    In conclusion, it acts as a gatekeeper.