Skip to content

khulnasoft/RapidDocs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Rapiddocs is a toolkit that allows you to input your API Definition and output SDKs and API documentation. Rapiddocs is compatible with the OpenAPI specification (formerly Swagger).

🌿 SDKs

The Rapiddocs toolkit is available via a command line interface (CLI) and requires Node 18+. To install it, run:

npm install -g khulnasoft

Initialize Rapiddocs with your OpenAPI spec:

rapiddocs init --openapi ./path/to/openapi.yml
# or
rapiddocs init --openapi https://link.buildwithrapiddocs.com/plantstore-openapi

Your directory should look like the following:

rapiddocs/
β”œβ”€ rapiddocs.config.json
β”œβ”€ generators.yml # generators you're using
└─ openapi/
  └─ openapi.json # your openapi document

Finally, to invoke the generator, run:

rapiddocs generate

πŸŽ‰ Once the command completes, you'll see your SDK in /generated/sdks/typescript.

🌿 API Documentation

Rapiddocs can also build and host a documentation website with an auto-generated API reference. Write additional pages in markdown and have them versioned with git. Search, SEO, dark mode, and popular components are provided out-of-the-box. Plus, you can customize the colors, font, logo, and domain name.

Check out docs built with Rapiddocs:

Get started here.

🌿 Generators

Generators are process that take your API Definition as input and output artifacts (SDKs, Postman Collections, Server boilerplate, etc.). To add a generator run rapiddocs add <generator id>

SDK Generators

Generator ID Latest Version Entrypoint
rapiddocsapi/rapiddocs-typescript-node-sdk Typescript Generator Version cli.ts
rapiddocsapi/rapiddocs-python-sdk Python Generator Version cli.py
rapiddocsapi/rapiddocs-java-sdk Java Generator Version Cli.java
rapiddocsapi/rapiddocs-ruby-sdk Ruby Generator Version cli.ts
rapiddocsapi/rapiddocs-go-sdk Go Generator Version main.go
rapiddocsapi/rapiddocs-csharp-sdk C# Generator Version cli.ts
rapiddocsapi/rapiddocs-php-sdk PHP Generator Version cli.ts

Server-side Generators

Rapiddocs's server-side generators output boilerplate application code (models and networking logic). This is intended for spec-first or API-first developers, who write their API definition (as an OpenAPI spec or Rapiddocs definition) and want to generate backend code.

Generator ID Latest Version Entrypoint
rapiddocsapi/rapiddocs-typescript-express Typescript Express Server Generator Version cli.ts
rapiddocsapi/rapiddocs-fastapi-server Python FastAPI Server Generator Version cli.py
rapiddocsapi/rapiddocs-java-spring Java Spring Server Generator Version Cli.java

Model Generators

Rapiddocs's model generators will output schemas or types defined in your OpenAPI spec or Rapiddocs Definition.

Generator ID Latest Version Entrypoint
rapiddocsapi/rapiddocs-pydantic-model Pydantic Model Generator Version cli.py
rapiddocsapi/java-model Java Model Generator Version Cli.java
rapiddocsapi/rapiddocs-ruby-model Ruby Model Generator Version cli.ts
rapiddocsapi/rapiddocs-go-model Go Model Generator Version main.go

Spec Generators

Rapiddocs's spec generators can output an OpenAPI spec or a Postman collection.

Note: The OpenAPI spec generator is primarily intended for Rapiddocs Definition users. This prevents lock-in so that one can always export to OpenAPI.

Generator ID Latest Version Entrypoint
rapiddocsapi/rapiddocs-openapi OpenAPI Generator Version cli.ts
rapiddocsapi/rapiddocs-postman Postman Generator Version cli.ts

🌿 CLI Commands

Here's a quick look at the most popular CLI commands. View the documentation for all CLI commands.

rapiddocs init: adds a new starter API to your repository.

rapiddocs check: validate your API definition and Rapiddocs configuration.

rapiddocs generate: run the generators specified in generators.yml in the cloud.

rapiddocs generate --local: run the generators specified in generators.yml in docker locally.

rapiddocs add <generator>: include a new generator in your generators.yml. For example, rapiddocs add rapiddocs-python-sdk.

Advanced

API First

Rapiddocs supports developers and teams that want to be API-first or Spec-first.

Define your API, and use Rapiddocs to generate models, networking code and boilerplate application code. The generated code adds type safety to your API implementation - if your backend doesn't implement the API correctly, it won't compile.

Frameworks currently supported:

Rapiddocs Definition

While we are big fans of OpenAPI, we know it isn't the easiest format to read and write. If you're looking for an alternative, give the Rapiddocs Definition a try.

Install the Rapiddocs CLI and initialize a Rapiddocs Project.

npm install -g khulnasoft
rapiddocs init

This will create the following folder structure in your project:

rapiddocs/
β”œβ”€ rapiddocs.config.json # root-level configuration
β”œβ”€ generators.yml # generators you're using
└─ definition/
  β”œβ”€ api.yml  # API-level configuration
  └─ imdb.yml # endpoints, types, and errors

Here's what the imdb.yml starter file looks like:

types:
  MovieId: string

  Movie:
    properties:
      id: MovieId
      title: string
      rating:
        type: double
        docs: The rating scale is one to five stars

  CreateMovieRequest:
    properties:
      title: string
      rating: double

service:
  auth: false
  base-path: /movies
  endpoints:
    createMovie:
      docs: Add a movie to the database
      method: POST
      path: /create-movie
      request: CreateMovieRequest
      response: MovieId

    getMovie:
      method: GET
      path: /{movieId}
      path-parameters:
        movieId: MovieId
      response: Movie
      errors:
        - MovieDoesNotExistError

errors:
  MovieDoesNotExistError:
    status-code: 404
    type: MovieId

Checkout open source projects that are using Rapiddocs Definitions:

Inspiration

Rapiddocs is inspired by internal tooling built to enhance the developer experience. We stand on the shoulders of giants. While teams were responsible for building the following tools, we want to give a shout out to Mark Elliot (creator of Conjure at Palantir), Michael Dowling (creator of Smithy at AWS), and Ian McCrystal (creator of Stripe Docs).

Community

Join our Discord! We are here to answer questions and help you get the most out of Rapiddocs.

Contributing

We welcome community contributions. For guidelines, refer to our CONTRIBUTING.md.

Rapiddocs Contributors

About

No description, website, or topics provided.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published