Git Product home page Git Product logo

api-docs-generator's Introduction

API docs generator

This is a very basic script that renders the YAML file (in the OpenAPI 3.0 spec) that is used as the source for Firefly III's API documentation. I wrote it because the API YAML file was well over 1400 lines before I got sick of editing such a large file. The current stitched result is well over 7500 lines at the time of writing.

How it works

What it does is simply join all YAML files in /yaml/ together, preceded by the start.yaml.twig file in the /templates/ directory.

  1. Rename .env.example to .env and adjust the variables accordingly, e.g.

    API_VERSION=0.10.0
    API_DESTINATION=./
    API_ROOT=./
  2. Install dependencies via Composer

    $ composer install

  3. Install PHP yaml.so extension. It should be added to your php.ini automatically.

    $ pecl install yaml

  4. Generate firefly-iii-${API_VERSION}.yaml file

    $ php index.php

The resulting firefly-iii-${API_VERSION}.yaml file can be imported into your favorite API development environment to play around with, e.g. Postman.

Firefly III API collection in Postman

Current state

I'm actively writing all API documentation, so the file may change.

Contributing

Feel free to create a PR on anything. If you want to change endpoints, check out /yaml/paths. Or edit objects in /yaml/schemas. This is my first API document so feel free to tell me how to improve.

See the result

You can see the result on this page.

Do you need help, or do you want to get in touch?

Do you want to contact me? You can email me at [email protected] or get in touch through one of the following support channels:

Support the development of Firefly III

If you like Firefly III and if it helps you save lots of money, why not send me a dime for every dollar saved! ๐Ÿฅณ

OK that was a joke. If you feel Firefly III made your life better, please consider contributing as a sponsor. Please check out my Patreon and GitHub Sponsors page for more information. You can also buy me a โ˜•๏ธ coffee at ko-fi.com. Thank you for your consideration.

api-docs-generator's People

Contributors

barskern avatar cedricpim avatar dependabot[bot] avatar dreautall avatar emansih avatar geoffreyfrogeye avatar jafin avatar jc5 avatar marcelbrueckner avatar michaelhthomas avatar ms32035 avatar nagyv avatar soraxas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.