angel3_openapi 10.0.0
angel3_openapi: ^10.0.0 copied to clipboard
OpenAPI 3.1 documents of Angel3 applications, built from their routes and services, with a Swagger UI page.
Change Log #
10.0.0 #
New in 10.0.0 #
- Security: An operation whose route has a handler tagged with a
SecurityRequirementofangel3_framework, asrequireAuthenticationandforceBasicAuthofangel3_auth10.1.0 are, even ofchainor of a chained router, has itssecurity, of one scheme of each requirement, and the response of each to a request that is not authenticated; its schemes are thecomponents.securitySchemes. Thecomponentsofextrajoin those ofschemasand of the handlers, of whichsecuritySchemesare merged by name - Documents:
OpenApibuilds an OpenAPI 3.1 document of an app: an operation of each route of an HTTP method, of groups and mounted routers too, with its path parameters (integerofint:,numberofdouble:andnum:, apatternof a regular expression, and both paths of an optional one), and itsnameas itsoperationId. Routes of a wildcard, or of any method, are left out - Services: A service mounted with
app.use, of the app or of an app mounted or chained in it (under the path of the mount, as/api/todos, but for a mount of a parameter), documents itsindex,create,read,modify,updateandremove, with the201thatcreateresponds with, a400of each, the query parameters of theindexof aDocumentedServiceofangel3_framework, as aMapServiceor anOrmServiceis, and the errors it tells of, as a409of anOrmService, and an{id}of the type of its ids (integerof aService<int?, ...>,numberof adoubleornum, elsestring), of the schema of the name of its data type, asTodoof anOrmService<int?, Todo, TodoQuery>, or of another thatdescribeServicegives, with a tag - Descriptions:
describeadds a summary, tags, query parameters, request and response schemas, and more of the Operation Object ofextra, of a path as the route writes it or as OpenAPI does.schemasare the document'scomponents, whichOpenApi.refrefers to - Schemas:
OpenApi.schemasOfcollects the JSON Schemas thatangel3_serialize_generator10.1.0 generates of@serializablemodels, with those of the models they hold - Controllers: A method of a
Controlleris described by an@OpenApiOperationannotation, read through the app's reflector,MirrorsReflectoror the reflection data ofangel3_container_generator - Serving:
configureServerserves the document at/openapi.jsonand a Swagger UI page at/docs, built when asked for, so routes added later are documented, and once in production