Skip to content

Commit

Permalink
Merge branch 'release/0.0.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Morgunov committed Sep 18, 2018
2 parents 1985576 + da62ce3 commit 5da67e7
Show file tree
Hide file tree
Showing 19 changed files with 1,237 additions and 1 deletion.
168 changes: 168 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
### NetBeans template
nbproject/private/
build/
nbbuild/
dist/
nbdist/
.nb-gradle/
### Eclipse template

.metadata
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.settings/
.loadpath
.recommenders

.DS_Store
.idea/

# External tool builders
.externalToolBuilders/

# Locally stored "Eclipse launch configurations"
*.launch

# PyDev specific (Python IDE for Eclipse)
*.pydevproject

# CDT-specific (C/C++ Development Tooling)
.cproject

# CDT- autotools
.autotools

# Java annotation processor (APT)
.factorypath

# PDT-specific (PHP Development Tools)
.buildpath

# sbteclipse plugin
.target

# Tern plugin
.tern-project

# TeXlipse plugin
.texlipse

# STS (Spring Tool Suite)
.springBeans

# Code Recommenders
.recommenders/

# Scala IDE specific (Scala & Java development for Eclipse)
.cache
.cache-main
.cache-tests
.scala_dependencies
.worksheet
### Java template
# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff:
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/dictionaries

# Sensitive or high-churn files:
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.xml
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml

# Gradle:
.idea/**/gradle.xml
.idea/**/libraries

# CMake
cmake-build-debug/
cmake-build-release/

# Mongo Explorer plugin:
.idea/**/mongoSettings.xml

## File-based project format:
*.iws

## Plugin-specific files:

# IntelliJ
out/
logs/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

### Maven template
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties

# Avoid ignoring Maven wrapper jar file (.jar files are usually ignored)
!/.mvn/wrapper/maven-wrapper.jar

### SBT template
# Simple Build Tool
# http://www.scala-sbt.org/release/docs/Getting-Started/Directories.html#configuring-version-control

dist/*
lib_managed/
src_managed/
project/boot/
project/plugins/project/
.history
.lib/
!sbt-launch.jar
Binary file added .mvn/wrapper/maven-wrapper.jar
Binary file not shown.
1 change: 1 addition & 0 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.0/apache-maven-3.5.0-bin.zip
24 changes: 24 additions & 0 deletions .travis.settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>ossrh</id>
<username>${env.OSS_USERNAME}</username>
<password>${env.OSS_PASSWORD}</password>
</server>
</servers>
<profiles>
<profile>
<id>ossrh</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<gpg.executable>gpg2</gpg.executable>
<gpg.passphrase>${env.GPG_PASSPHRASE}</gpg.passphrase>
</properties>
</profile>
</profiles>
</settings>
34 changes: 34 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
language: java

env:
- MAVEN_OPTS="-Dhttp.agent=Maven"

cache:
directories:
- $HOME/.cache
- $HOME/.m2

before_install:
- cp .travis.settings.xml $HOME/.m2/settings.xml
- echo $GPG_SECRET_KEYS | base64 --decode | gpg2 --import

install: ./mvnw compile dependency:resolve dependency:resolve-plugins -B -V

script: ./mvnw verify -B -V

after_success:
- bash <(curl -s https://codecov.io/bash)

deploy:
# Deploy releases
- provider: script
script: ./mvnw deploy -B -V -P release
skip_cleanup: true
on:
tags: true
# Deploy snapshots
- provider: script
script: ./mvnw deploy -B -V
skip_cleanup: true
on:
branch: develop
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,18 @@
# taymyr-openapi-java
[![codebeat](https://codebeat.co/badges/36a7965b-aa57-40af-8db3-fd7e6b54fee3)](https://codebeat.co/projects/github-com-taymyr-openapi-java-develop)
[![Build Status](https://travis-ci.org/taymyr/openapi-java.svg?branch=develop)](https://travis-ci.org/taymyr/openapi-java)
[![Javadoc API](https://www.javadoc.io/badge/org.taymyr/openapi-java-api.svg?label=javadoc%20api)](https://www.javadoc.io/doc/org.taymyr/openapi-java-api)
[![Javadoc Impl](https://www.javadoc.io/badge/org.taymyr/openapi-java-impl.svg?label=javadoc%20impl)](https://www.javadoc.io/doc/org.taymyr/openapi-java-impl)
[![codecov](https://codecov.io/gh/taymyr/openapi-java/branch/develop/graph/badge.svg)](https://codecov.io/gh/taymyr/openapi-java)
[![Maven API](https://img.shields.io/maven-central/v/org.taymyr/openapi-java.svg)](https://search.maven.org/search?q=a:openapi-java%20AND%20g:org.taymyr)

# OpenAPI service for Lagom

TODO

## License

Copyright © 2018 Digital Economy League (https://www.digitalleague.ru/).

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this project except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
49 changes: 49 additions & 0 deletions api/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.taymyr</groupId>
<artifactId>openapi-java</artifactId>
<version>0.0.1</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>openapi-java-api</artifactId>
<packaging>jar</packaging>
<name>Taymyr: Openapi Java API</name>
<dependencies>
<dependency>
<groupId>com.lightbend.lagom</groupId>
<artifactId>lagom-javadsl-api_${scala.binary.version}</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<phase>prepare-package</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
31 changes: 31 additions & 0 deletions api/src/main/java/org/taymyr/openapi/OpenAPIService.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package org.taymyr.openapi;

import akka.NotUsed;
import com.lightbend.lagom.javadsl.api.Descriptor;
import com.lightbend.lagom.javadsl.api.Service;
import com.lightbend.lagom.javadsl.api.ServiceCall;

import static com.lightbend.lagom.javadsl.api.Service.pathCall;

import static java.lang.String.format;

/**
* OpenAPI service descriptor.
*
* @author Sergey Morgunov
*/
public interface OpenAPIService extends Service {

/**
* Return OpenAPI specification for current service.
* @return OpenAPI specification
*/
ServiceCall<NotUsed, String> openapi();

default Descriptor withOpenAPI(Descriptor descriptor) {
return descriptor.withCalls(
pathCall(format("/%s/openapi", descriptor.name()), this::openapi)
);
}

}
Loading

0 comments on commit 5da67e7

Please sign in to comment.