Skip to content
This repository was archived by the owner on Apr 10, 2025. It is now read-only.

Commit 5ee5017

Browse files
author
hiwayama
committed
init
0 parents  commit 5ee5017

File tree

20 files changed

+709
-0
lines changed

20 files changed

+709
-0
lines changed

.gitignore

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
2+
# Created by https://www.gitignore.io/api/java,gradle,intellij
3+
4+
### Intellij ###
5+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
6+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
7+
8+
# User-specific stuff:
9+
.idea/**/workspace.xml
10+
.idea/**/tasks.xml
11+
.idea/dictionaries
12+
13+
# Sensitive or high-churn files:
14+
.idea/**/dataSources/
15+
.idea/**/dataSources.ids
16+
.idea/**/dataSources.xml
17+
.idea/**/dataSources.local.xml
18+
.idea/**/sqlDataSources.xml
19+
.idea/**/dynamic.xml
20+
.idea/**/uiDesigner.xml
21+
22+
# Gradle:
23+
.idea/**/gradle.xml
24+
.idea/**/libraries
25+
26+
# CMake
27+
cmake-build-debug/
28+
29+
# Mongo Explorer plugin:
30+
.idea/**/mongoSettings.xml
31+
32+
## File-based project format:
33+
*.iws
34+
35+
## Plugin-specific files:
36+
37+
# IntelliJ
38+
/out/
39+
40+
# mpeltonen/sbt-idea plugin
41+
.idea_modules/
42+
43+
# JIRA plugin
44+
atlassian-ide-plugin.xml
45+
46+
# Cursive Clojure plugin
47+
.idea/replstate.xml
48+
49+
# Ruby plugin and RubyMine
50+
/.rakeTasks
51+
52+
# Crashlytics plugin (for Android Studio and IntelliJ)
53+
com_crashlytics_export_strings.xml
54+
crashlytics.properties
55+
crashlytics-build.properties
56+
fabric.properties
57+
58+
### Intellij Patch ###
59+
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
60+
61+
# *.iml
62+
# modules.xml
63+
# .idea/misc.xml
64+
# *.ipr
65+
66+
# Sonarlint plugin
67+
.idea/sonarlint
68+
69+
### Java ###
70+
# Compiled class file
71+
*.class
72+
73+
# Log file
74+
*.log
75+
76+
# BlueJ files
77+
*.ctxt
78+
79+
# Mobile Tools for Java (J2ME)
80+
.mtj.tmp/
81+
82+
# Package Files #
83+
*.jar
84+
*.war
85+
*.ear
86+
*.zip
87+
*.tar.gz
88+
*.rar
89+
90+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
91+
hs_err_pid*
92+
93+
### Gradle ###
94+
.gradle
95+
**/build/
96+
97+
# Ignore Gradle GUI config
98+
gradle-app.setting
99+
100+
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
101+
!gradle-wrapper.jar
102+
103+
# Cache of project
104+
.gradletasknamecache
105+
106+
# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
107+
# gradle/wrapper/gradle-wrapper.properties
108+
109+
110+
# End of https://www.gitignore.io/api/java,gradle,intellij

.idea/compiler.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# jsonrpc4j-jsonSchema
2+
3+
This module is [jackson-module-jsonschema](https://github.com/FasterXML/jackson-module-jsonSchema) wrapper for the creation of api document (like JSON-Schema) from POJO of [jsonrpc4j](https://github.com/briandilley/jsonrpc4j) service classes.
4+
5+
6+
7+
## Example Usage
8+
9+
```
10+
JsonRpcSchemaGenerator generator = new JsonRpcSchemaGenerator();
11+
12+
// generate schemas each json-rpc methods
13+
for (JsonRpcSchema schema : generator.generate(HogeService.class)) {
14+
System.out.println(new ObjectMapper().writeAsString(schema));
15+
// {
16+
// "method": "Hoge.methodName",
17+
// "request": {
18+
// // request object JSON-Schema
19+
// },
20+
// "response": {
21+
// // response object JSON-Schema
22+
// }
23+
// }
24+
}
25+
```

build.gradle

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
plugins {
2+
id 'java'
3+
}
4+
5+
group 'com.github.hiwayama'
6+
version '0.1-SNAPSHOT'
7+
8+
sourceCompatibility = 1.8
9+
10+
repositories {
11+
mavenCentral()
12+
}
13+
14+
dependencies {
15+
compile "com.fasterxml.jackson.module:jackson-module-jsonSchema:2.8.5"
16+
compile 'com.github.briandilley.jsonrpc4j:jsonrpc4j:1.5.3'
17+
compileOnly "org.projectlombok:lombok:1.16.20"
18+
testCompile group: 'junit', name: 'junit', version: '4.12'
19+
}

config.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Java Gradle CircleCI 2.0 configuration file
2+
#
3+
# Check https://circleci.com/docs/2.0/language-java/ for more details
4+
#
5+
version: 2
6+
jobs:
7+
build:
8+
docker:
9+
# specify the version you desire here
10+
- image: circleci/openjdk:8-jdk
11+
12+
# Specify service dependencies here if necessary
13+
# CircleCI maintains a library of pre-built images
14+
# documented at https://circleci.com/docs/2.0/circleci-images/
15+
# - image: circleci/postgres:9.4
16+
17+
working_directory: ~/repo
18+
19+
environment:
20+
# Customize the JVM maximum heap limit
21+
JVM_OPTS: -Xmx3200m
22+
TERM: dumb
23+
24+
steps:
25+
- checkout
26+
27+
# Download and cache dependencies
28+
- restore_cache:
29+
keys:
30+
- v1-dependencies-{{ checksum "build.gradle" }}
31+
# fallback to using the latest cache if no exact match is found
32+
- v1-dependencies-
33+
34+
- run: gradle dependencies
35+
36+
- save_cache:
37+
paths:
38+
- ~/.gradle
39+
key: v1-dependencies-{{ checksum "build.gradle" }}
40+
41+
# run tests!
42+
- run: gradle test
43+
44+

gradle/wrapper/gradle-wrapper.jar

53.1 KB
Binary file not shown.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#Thu Jun 14 18:10:57 JST 2018
2+
distributionBase=GRADLE_USER_HOME
3+
distributionPath=wrapper/dists
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip

0 commit comments

Comments
 (0)