Extracts documentation from the documentation website and generates an OpenAPI 3.0 file that can be used to further generate a client. You can see for example the harvest-php-api library, or the Swagger editor loaded with this OpenApi file.
$ composer install
$ ./bin/extractor generate
Then check the generated
directory, it should contain an OpenAPI 3.0 valid
file named harvest-openapi.yaml
.
You can get the generated file here: https://raw.githubusercontent.com/jolicode/harvest-openapi-generator/master/generated/harvest-openapi.yaml
There are many tools to use an OpenAPI / Swagger specification:
- API documentation generation
- API client SDK generation, in many languages,
- etc.
Please check out the Swagger website, which lists many useful tools and integrations.
This extractor/generator uses several nasty tricks to extract Harvest API properties... the process is not bulletproof and may break in case of documentation change. Should you find a bug, incompleteness or problem with the generated Swagger specification, please do not hesitate to open an issue and share it with us.
If the documentation is incomplete, you
may want to override a definition. See the
JoliCode\Extractor\Dumper\Dumper:dump()
method.
You can see the current and past versions using one of the following:
- the
git tag
command - the releases page on Github
And, finally, some contribution instructions.
This library is licensed under the MIT License - see the LICENSE file for details.