Skip to content

medly/apifi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

6682f17 · Sep 18, 2020

History

63 Commits
Sep 11, 2020
Jul 21, 2020
Sep 18, 2020
Aug 8, 2020
Aug 9, 2020
Aug 8, 2020
Jul 9, 2020
Sep 11, 2020
Sep 11, 2020
Sep 16, 2020
Jul 21, 2020
Aug 8, 2020
Aug 8, 2020
Aug 8, 2020

Repository files navigation

Apifi

Spec driven REST APIs

Build the Distribution

Include in gradle project

1. Add jitpack repository in settings.gradle:

pluginManagement {
    repositories {
        gradlePluginPortal()
        maven {
            url 'https://jitpack.io'
            content {
                includeGroup 'com.medly.apifi'
            }
        }
    }
    resolutionStrategy {
        eachPlugin {
            if (requested.id.namespace == 'com.medly') {
                useModule("${requested.id}:${requested.id}.gradle.plugin:ab816d1a84")
            }
        }
    }
}

2. Add plugin in build.gradle:

plugins {
    ....
    id "com.medly.apifi"
    ...
}

3. Add gradle task to generate code:

apifi {
    openApiSpec file("path/to/spec-file")
    generatedSourceDir file("path/to/gen")
    basePackageName "com.your.package.name"
}

Generate APIs

./gradlew apifi