Skip to content
/ eskema Public

Eskema is a code generation tool that generates classes from schemas

License

Notifications You must be signed in to change notification settings

Haato3o/eskema

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eskema-banner

About

Eskema is a command-line tool that generates class/data class for other programming languages based on a schema. This is useful for when you have multiple applications in different programming languages that can communicate between them with well defined contracts.

Installation

TODO

Usage

To use Eskema, you need to provide a schema file that defines the structure of the class/data class you want to generate. Here's an example:

enum Status
{
  ONLINE,
  BUSY,
  AWAY,
  OFFLINE
};

schema User 
{
  userId: Int64,
  name: String,
  email: String,
  status: Status,
  friends: Array<Long>?
};

To generate a class from the previous schema, you can run the following command:

eskema --filename example.skm --language kotlin --output example.kt

This will generate the following code:

enum Status {
  ONLINE,
  BUSY,
  AWAY,
  OFFLINE
}

data class User(
  val userId: Long,
  val name: String,
  val email: String,
  val status: Status,
  val friends: List<Long>?
)

Eskema currently supports the following languages:

  • C#
  • Kotlin
  • GoLang

Contributing

If you want to contribute to Eskema, please read our contributing guidelines before submitting a pull request.

License

Eskema is licensed under the MIT License. See LICENSE for more information.

About

Eskema is a code generation tool that generates classes from schemas

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages