You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-- {"openapi":"3.0.0","info":{"version":"","title":""},"paths":{"/":{"get":{"responses":{"200":{"content":{"application/json;charset=utf-8":{"schema":{"items":{"$ref":"#/components/schemas/User"},"type":"array"}}},"description":""}}},"post":{"requestBody":{"content":{"application/json;charset=utf-8":{"schema":{"$ref":"#/components/schemas/User"}}}},"responses":{"400":{"description":"Invalid `body`"},"200":{"content":{"application/json;charset=utf-8":{"schema":{"$ref":"#/components/schemas/UserId"}}},"description":""}}}},"/{user_id}":{"get":{"parameters":[{"required":true,"schema":{"type":"integer"},"in":"path","name":"user_id"}],"responses":{"404":{"description":"`user_id` not found"},"200":{"content":{"application/json;charset=utf-8":{"schema":{"$ref":"#/components/schemas/User"}}},"description":""}}}}},"components":{"schemas":{"User":{"required":["name","age"],"type":"object","properties":{"age":{"maximum":9223372036854775807,"minimum":-9223372036854775808,"type":"integer"},"name":{"type":"string"}}},"UserId":{"type":"integer"}}}}
103
103
--
104
-
-- By default @'toSwagger'@ will generate specification for all API routes, parameters, headers, responses and data schemas.
104
+
-- By default @'toOpenApi'@ will generate specification for all API routes, parameters, headers, responses and data schemas.
105
105
--
106
106
-- For some parameters it will also add 400 and/or 404 responses with a description mentioning parameter name.
107
107
--
108
108
-- Data schemas come from @'ToParamSchema'@ and @'ToSchema'@ classes.
109
109
110
110
-- $annotate
111
-
-- While initially generated @'Swagger'@ looks good, it lacks some information it can't get from a servant API.
111
+
-- While initially generated @'OpenApi'@ looks good, it lacks some information it can't get from a servant API.
112
112
--
113
-
-- We can add this information using field lenses from @"Data.Swagger"@:
113
+
-- We can add this information using field lenses from @"Data.OpenApi"@:
0 commit comments