connexions

module
v0.1.47 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 12, 2025 License: MIT

README

Connexions

CI Endpoint Badge GoReportCard GoDoc License

Connexions is a library originally inspired by Connexion.
Connexion allows you to set up a REST API with Swagger documentation and OAuth2 authentication with minimal effort.

Connexions takes this one step further by allowing you to define multiple APIs not limited to only Swagger and(or) OpenAPI.
You can define single response for any arbitrary path on the fly.

Goals

  • provide a simple tool to work with API mocks
  • combine multiple APIs into one
  • generate meaningful responses

Features

  • Using upstream services with circuit breaker
  • Randomized response contents, allowing you to redefine the response for any path
  • Modify response contents on the fly by providing custom middleware
  • Configurable latencies and errors in responses
  • In memory cache for generated responses

Simple start

docker run -it --rm \
  -p 2200:2200 \
  -v connexions:/app/resources/data \
  cubahno/connexions api

We also have a JSON Schema that can be used by IDEs/editors with the Language Server Protocol (LSP) to perform intelligent suggestions, i.e.:

# yaml-language-server: $schema=https://raw.githubusercontent.com/cubahno/connexions/refs/heads/master/resources/json-schema.json
app:
  port: 2200
  disableUI: true
# ...

Read full documentation at cubahno.github.io/connexions.

OpenAPI Specification

License

Copyright (c) 2023-present

Licensed under the MIT License

===================

OpenAPI Specification
OpenAPI 3.0 Style Values
Operation Object
YAML format

Directories

Path Synopsis
cmd
internal
api

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL