Repository navigation
v1.0.22
Enhancements
ApiParser::generateOpenApi()makes a whole, valid OpenAPI 3.0 document.generateSwagger()
gave the paths, and the app put them together with OrmExtension's schemas. Those named a
relation astype: "Workspace"and a nullable astype: "?int", which no OpenAPI reader takes,
and left out a schema only another schema named. The new document has every endpoint, with an
operationId, and the schemas of the models, interfaces and static schemas the endpoints name,
and those they name in turn - a relation and an interface's property as a$ref, a?intas
nullable, anint[]in the query asids=1,2,3, aFileas a field of a multipart body. Every
$refpoints at a schema. It is checked against an OpenAPI reader in the tests.- An endpoint's doc comment is its documentation. The text above the tags is the operation's
summary and description, as PHPDoc has them;@summaryand the new@descriptionsay them over
it. The text after-on a@paramor@parameteris the parameter's description, and the
comment after a@propertythe property's. A resource controller's overriddenget(),post()
and so on keep their text to themselves - it says why they are overridden - and are documented by
@summaryand@descriptiononly.
Fixed bugs
required=falseis not required. It was the string"false", which PHP takes for true, so
generateSwagger()said such a parameter was required. A parameter withoutrequired=is still
required, as it was.
Upgrade guide
- Requires OrmExtension v1.1.9, which has the schemas of the models and the types of OpenAPI.
- Nothing else changes:
generateSwagger(), apart fromrequired=false, and the TypeScript, Vue and
Xamarin exports are as they were. The text of a doc comment is not the summary in Api.ts. - To move to the new document, build it with
generateOpenApi()- see "API Parser" in the README -
where you put togethergenerateSwagger()'s paths andModelParser::generateSwagger()'s schemas.
Give it yourinfo,serversand security schemes;contactbelongs ininfo, and
definitionsis Swagger 2.0, not OpenAPI 3.
Full Changelog: v1.0.21...v1.0.22