Open API
OpenAPI is a widely adopted specification for defining and documenting RESTful APIs in a structured, machine-readable format. By standardizing API definitions, OpenAPI enables seamless integration, automation, and interoperability between different services and tools.
Using a YAML or JSON-based contract, OpenAPI allows developers to specify endpoints, request/response schemas, authentication methods, and error handling in a clear and consistent manner. This specification can then be used to auto-generate API documentation, client SDKs, and server stubs, streamlining development and reducing manual effort.
Where is it used in the stack?
OpenAPI is used to define and document the RawStack API, ensuring clarity, consistency, and ease of integration for consumers. From this specification typescript, clients are generated which are used in the mobile app, admin dashboard and website.
Why are we using it?
OpenAPI was chosen for its ability to improve API maintainability, enable automation, and enhance developer experience. By providing a standardized contract, it facilitates smooth collaboration between teams, simplifies client integration, and allows for tools like code generation and validation, ensuring a reliable and well-documented API.