GithubHelp home page GithubHelp logo

markwalkom / discourse_api_docs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from discourse/discourse_api_docs

0.0 1.0 0.0 510 KB

Discourse API Documentation

Home Page: http://docs.discourse.org/

License: MIT License

HTML 44.34% JavaScript 47.42% Ruby 8.24%

discourse_api_docs's Introduction

Discourse API Documentation

To view the the Discourse API Documentation you can visit:

http://docs.discourse.org/

Here is an example of what the ReDoc site looks like:

redoc

Postman

In addition to the docs site, you can also import the postman json files into postman to test making real API calls and see the json output.

Postman files:

Start by importing the environment json file. After you import it be sure to change the base_url, api_username, and api_key values to match your discourse instance.

Now you can import the collection json file and start making API requests.

Here is a demo:

discourse_postman

Contributing

Contributions are welcome! Start by cloning the repo.

To edit the api docs, edit the swagger.yml file not the json file.

To view your changes locally, run:

npm install
node server.js

Browse to localhost:3001 to see the pretty docs.

Before you push your changes or create a PR convert the yml file to json:

node tojson.js

Then you can commit your changes and create a PR. This is because we are using github pages to host the static doc website.

Schema Generator

To aid in writing the yml responses in the swagger.yml file use this command to convert actual json responses to a yml schema file:

node toschema.js <input file> <output file>

Example:

node toschema.js responses/topics/topic_respones.json definitions/topics/topic_response.yml

This will convert a json response into json schema and then convert the schema to yml.

discourse_api_docs's People

Contributors

erlend-sh avatar hossamyoussef2009 avatar jaredreisinger avatar kennym avatar mikechristopher avatar oblakeerickson avatar rohitkumbhar avatar

Watchers

 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.