{"repo":"dankinsoid/VaporToOpenAPI","free":true,"listed":false,"github":"https://github.com/dankinsoid/VaporToOpenAPI","clone":"git clone https://github.com/dankinsoid/VaporToOpenAPI.git","description":"OpenAPI specification generator for Vapor based Swift projects.","language":"Swift","stars":135,"topics":["openapi","swagger","swift","vapor"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"VaporToOpenAPI VaporToOpenAPI is a Swift library that generates output compatible with OpenAPI version 3.0.1 from Vapor code. You can use the generated files with Swagger UI or Stoplight. The library is based on SwiftOpenAPI. Usage Create a route with an OpenAPI specification. Add a route that returns an OpenAPIObject using the app.routes.openAPI method. This method generates a complete OpenAPI specification from your Vapor routes. It accepts parameters like your API's title, description, available paths, operations, and security requirements. Configure a web page - Use stoplightDocumentation(openAPI:) helper method to generate a Stoplight page. This method also can return an OpenAPIObject . - Here is an example how to configure SwaggerUI. Specify all details for routes Use the .openAPI modifier on routes to specify parameters like operation summaries, descriptions, request/response bodies, query parameters, and headers. Here's an example of how you might use it to document a POST request: [!IMPORTANT] All enums in your models must implement CaseIterable . Advanced Usage VaporToOpenAPI offers several advanced features for customizing your OpenAPI documentation: - response : This method is used to specify an additional response body for a Vapor route. It takes a variety of parameters, such as the status code, description, and response body type. - groupedOpenAPI : These methods are used to group Vapor routes together based on OpenAPI metadata, such as tags or security requirem","default_branch":null,"files":null,"tree":[],"storefront":"/r/dankinsoid","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/dankinsoid/VaporToOpenAPI/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}