asyncApiCodeGen

command module
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2022 License: MIT Imports: 1 Imported by: 0

README

asyncApiCodeGen

This project aims to generate usable code from an asyncApi-spec (see https://www.asyncapi.com/).

Features

  • Create Kafka Code to be used in:
    • Go
    • Java

Limits

  • General: only Kafka as messaging backend
  • Go: for now only a specific flavor of the Kafka package is used which relies on a private repository, so only the types may be usable if you don't have access to the private repository

Datatypes, Format, Validations

Currently, these datatypes and formats are supported

Datatype/Format Java Go Validate
integer
int32 (format)
int64 (format)
number
float (format)
double (format)
string
email (format)
binary (format)
date (format)
date-time (format)
password (format)

Further the generator support to add validation/featuress on the resulting types/classes for

Validation/Feature Java Go Validate
required
email
default
minimum
maximum
exclusiveMinimum
exclusiveMaximum
minLength
maxLength
minItems
maxItems
uniqueItems
anyOf
oneOf
allOf
not
pattern
enum
multipleOf
minProperties
maxProperties
externalDoc
nullable
readOnly
writeOnly

Usage

$ asyncApiCodeGen generate -h
Used to generate code from async api spec. First argument is the spec and the second is the path to the output. 
        
        For example:
        asyncApiCodeGen generate in_spec.yaml out.go

Usage:
  asyncApiCodeGen generate [flags]

Flags:
  -f, --flavor string   Which flavor should be used?? (default "mosaic")
  -h, --help            help for generate
  -l, --lang string     What kind of code should be generated? (default "go")

Documentation

Overview

Copyright © 2022 NAME HERE <EMAIL ADDRESS>

Directories

Path Synopsis
go

Jump to

Keyboard shortcuts

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