https://github.com/oxlip-lang/oal
A high-level language for OpenAPI
https://github.com/oxlip-lang/oal
api lsp-server oas oasv3 openapi openapi3 rust
Last synced: 6 months ago
JSON representation
A high-level language for OpenAPI
- Host: GitHub
- URL: https://github.com/oxlip-lang/oal
- Owner: oxlip-lang
- License: apache-2.0
- Created: 2021-11-06T13:50:41.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2025-03-02T14:11:25.000Z (7 months ago)
- Last Synced: 2025-03-26T01:51:11.463Z (6 months ago)
- Topics: api, lsp-server, oas, oasv3, openapi, openapi3, rust
- Language: Rust
- Homepage:
- Size: 613 KB
- Stars: 34
- Watchers: 2
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README

[](https://opensource.org/licenses/Apache-2.0)# The Oxlip API Language
Oxlip is a high-level functional programming language for designing [OpenAPI](https://www.openapis.org/what-is-openapi) definitions.
As an [Interface Description Language](https://en.wikipedia.org/wiki/Interface_description_language), it is not general purpose.
The motivation is to alleviate the pain of managing OpenAPI in JSON or YAML by hand and at scale.
Oxlip defines algebraic abstractions over [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) concepts, not too dissimilar to [Sass/SCSS over CSS](https://sass-lang.com/).There are pros and cons to both _API-design-first_ and OpenAPI generated from implementation.
As OpenAPI is better produced or consumed by machines rather than humans, Oxlip tries to help _API-design-first_ teams with better tooling.## [Documentation](https://www.oxlip-lang.org/)
## [Playground](https://oxlip-lang.github.io/oxlip-playground)
## Installation
This step requires a [local Rust and Cargo installation](https://doc.rust-lang.org/cargo/getting-started/installation.html).```
make install
```
Optional: a [VSCode language extension](https://github.com/oxlip-lang/oal-vscode) is available for syntax highlighting and IDE capabilities.## Usage
```
oal-cli [OPTIONS]OPTIONS:
-b, --base The relative URL to a base OpenAPI description
-c, --conf The path to the configuration file
-h, --help Print help information
-m, --main The relative URL to the main program
-t, --target The relative URL to the target OpenAPI description
```### Compiling the example program
```
oal-cli --conf examples/oal.toml
```## Experimental: WebAssembly support
Release to WebAssembly requires the installation of [`wasm-pack`](https://rustwasm.github.io/wasm-pack/installer/).```
make wasm
```