Skip to content

Commit

Permalink
Test openapitools/openapi-generator-cli (#89)
Browse files Browse the repository at this point in the history
* test openapitools/openapi-generator-cli for code generation

* generate code with openapitools/openapi-generator-cli
  • Loading branch information
cstaud authored Dec 5, 2023
1 parent 52177bd commit 8334e45
Show file tree
Hide file tree
Showing 363 changed files with 93,972 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,11 @@ generate: clean ## Generate the API Go client and the JSON document for the UI

validate: ## Check that the swagger spec is valid.
go run github.com/go-swagger/go-swagger/cmd/[email protected] validate $(SWAGGER_SPEC)

test: ## Generate with openapitools/openapi-generator-cli
docker run --rm -v $(shell pwd):/local openapitools/openapi-generator-cli generate \
-i /local/swagger.json \
-g go \
-o /local/go2 \
--git-user-id=staffbase \
--git-repo-id=bitrise-api
24 changes: 24 additions & 0 deletions go2/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Compiled Object files, Static and Dynamic libs (Shared Objects)
*.o
*.a
*.so

# Folders
_obj
_test

# Architecture specific extensions/prefixes
*.[568vq]
[568vq].out

*.cgo1.go
*.cgo2.c
_cgo_defun.c
_cgo_gotypes.go
_cgo_export.*

_testmain.go

*.exe
*.test
*.prof
23 changes: 23 additions & 0 deletions go2/.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
Loading

0 comments on commit 8334e45

Please sign in to comment.