Skip to content

Commit

Permalink
Replaced swagger2markup maven plugin with openapi-generator (#928)
Browse files Browse the repository at this point in the history
* Replaced swagger2markup maven plugin with openapi-generator

Signed-off-by: Paolo Patierno <[email protected]>

* Fixed local path issue to the snippet dir

Signed-off-by: Paolo Patierno <[email protected]>

* Added OpenAPI validation during documentation build
Fixed OpenAPI v3 spec for missing items def under array types

Signed-off-by: Paolo Patierno <[email protected]>

* Fixed scholzj comments

Signed-off-by: Paolo Patierno <[email protected]>

* Removed JCenter repository

Signed-off-by: Paolo Patierno <[email protected]>

* Fixed key and value schemas to be consistent across consumer and producer
records

Signed-off-by: Paolo Patierno <[email protected]>

* Fixed key and value schemas to be consistent across consumer and
producer records on OpenAPI v2

Signed-off-by: Paolo Patierno <[email protected]>

* Extracted a common RecordKey and RecordValue components for consumer and
producer record definitions

Signed-off-by: Paolo Patierno <[email protected]>

* Fixed openapi related test

Signed-off-by: Paolo Patierno <[email protected]>

---------

Signed-off-by: Paolo Patierno <[email protected]>
  • Loading branch information
ppatierno authored Sep 28, 2024
1 parent 4cb7075 commit d999a35
Show file tree
Hide file tree
Showing 52 changed files with 4,627 additions and 2,047 deletions.
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,19 @@ release_package: java_package
docu_html: docu_htmlclean docu_check
mkdir -p documentation/html
$(CP) -vrL documentation/book/images documentation/html/images
asciidoctor -v --failure-level WARN -t -dbook -a ProductVersion=$(RELEASE_VERSION) documentation/book/bridge.adoc -o documentation/html/bridge.html
# override snippetDir for asciidoctor to get right path to the snippets
asciidoctor -v --failure-level WARN -t -dbook -a ProductVersion=$(RELEASE_VERSION) -a snippetDir=${PWD}/documentation/book/api/snippet/ documentation/book/bridge.adoc -o documentation/html/bridge.html

.PHONY: docu_htmlnoheader
docu_htmlnoheader: docu_htmlnoheaderclean docu_check
mkdir -p documentation/htmlnoheader
$(CP) -vrL documentation/book/images documentation/htmlnoheader/images
asciidoctor -v --failure-level WARN -t -dbook -a ProductVersion=$(RELEASE_VERSION) -s documentation/book/bridge.adoc -o documentation/htmlnoheader/bridge.html
# override snippetDir for asciidoctor to get right path to the snippets
asciidoctor -v --failure-level WARN -t -dbook -a ProductVersion=$(RELEASE_VERSION) -a snippetDir=${PWD}/documentation/book/api/snippet/ -s documentation/book/bridge.adoc -o documentation/htmlnoheader/bridge.html

.PHONY: docu_api
docu_api:
mvn $(MVN_ARGS) -P apidoc io.github.swagger2markup:swagger2markup-maven-plugin:convertSwagger2markup@generate-apidoc
mvn $(MVN_ARGS) -P apidoc org.openapitools:openapi-generator-maven-plugin:generate@generate-apidoc

.PHONY: docu_check
docu_check: docu_api
Expand Down
23 changes: 23 additions & 0 deletions documentation/book/api/.openapi-generator-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# OpenAPI Generator Ignore
# Generated by openapi-generator https://github.com/openapitools/openapi-generator

# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.

# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
#ApiClient.cs

# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux

# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux

# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
1 change: 1 addition & 0 deletions documentation/book/api/.openapi-generator/FILES
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
index.adoc
1 change: 1 addition & 0 deletions documentation/book/api/.openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7.8.0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
e4a70d99cdac5e8dddb45ce30c39817fa9402463074478e0fd3a05d6a7f849d5
321 changes: 0 additions & 321 deletions documentation/book/api/definitions.adoc

This file was deleted.

Loading

0 comments on commit d999a35

Please sign in to comment.