Skip to content

Api for creating generators for Apivolve, an API evolution tool that helps keep your APIs backwards compatible yet clean.

License

Notifications You must be signed in to change notification settings

mverleg/apivolve_generator_api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Apivolve generator API

This project is part of Apivolve, a project to describe api changes in evolution files.

The api description is automatically converted to code for parsing, including full backwards compatibility. This is done by generators for each language, which can be written fully independently from the main Apivolve repo.

This project is for if you want to use Rust to create your own Apivolve generator. You can use any other language you want; in that case, you parse the json yourself and do not need this library (example).

This repository contains:

  • The Rust types that Apivolve uses to describe the API
  • The boilerplate code for requesting and parsing this data in Rust.
  • Examples of simple generators in a few languages.

Protocol v1

Version 1 is currently the latest/only version.

Communication happens over a localhost TCP connection.

EDIT: support embedded (Rust) only for now, and then bootstrap the protocol with Apivolve itself

  • Apivolve runs the generator executable, with tcp address as argument.
  • The generator sends the configuration it expects to use (AcceptedFormat).
  • Apivolve sends the generator options, such as output directory and arguments (UserPreferences).
  • The generator sends the features and parties it wants, with (FunctionalityRequest).
  • Apivolve sends the requested information per version, one version at a time, from new to old.
  • For each of those, the generator generates the necessary code, and persists it.
  • Apivolve indicates that all versions have been sent, and the generator exits.

About

Api for creating generators for Apivolve, an API evolution tool that helps keep your APIs backwards compatible yet clean.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages