Skip to content

Commit

Permalink
Build ui client using openapi3.json
Browse files Browse the repository at this point in the history
  • Loading branch information
sevein committed Jul 18, 2023
1 parent ca65078 commit 95813f7
Show file tree
Hide file tree
Showing 29 changed files with 2,262 additions and 385 deletions.
12 changes: 5 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -119,17 +119,15 @@ ui-dev: # @HELP Serves the UI for development.

ui-client: # @HELP Generates the UI client using openapi-generator-cli.
rm -rf $(CURDIR)/ui/src/client
docker container run --rm --user $(shell id -u):$(shell id -g) --volume $(CURDIR):/local openapitools/openapi-generator-cli:v4.2.3 \
docker container run --rm --user $(shell id -u):$(shell id -g) --volume $(CURDIR):/local openapitools/openapi-generator-cli:v6.6.0 \
generate \
--input-spec /local/internal/api/gen/http/openapi.json \
--input-spec /local/internal/api/gen/http/openapi3.json \
--generator-name typescript-fetch \
--output /local/ui/src/openapi-generator/ \
--skip-validate-spec \
-p "generateAliasAsModel=true" \
-p "typescriptThreePlus=true" \
-p "withInterfaces=true"
-p "generateAliasAsModel=false" \
-p "withInterfaces=true" \
-p "supportsES6=true"
echo "@@@@ Please, review all warnings generated by openapi-generator-cli above!"
echo "@@@@ We're using \`--skip-validate-spec\` to deal with Goa spec generation issues."

db: # @HELP Opens the MySQL CLI.
docker compose exec --user=root mysql mysql -hlocalhost -uroot -proot123
Expand Down
16 changes: 8 additions & 8 deletions ui/src/components/CollectionStatusBadge.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ export default class CollectionStatusBadge extends Vue {
private defvariant: string = 'secondary';
private variants: any = {
[api.CollectionShowResponseBodyStatusEnum.Error]: 'danger',
[api.CollectionShowResponseBodyStatusEnum.InProgress]: 'warning',
[api.CollectionShowResponseBodyStatusEnum.Done]: 'success',
[api.CollectionShowResponseBodyStatusEnum.New]: 'secondary',
[api.CollectionShowResponseBodyStatusEnum.Unknown]: 'dark',
[api.CollectionShowResponseBodyStatusEnum.Abandoned]: 'secondary',
[api.CollectionShowResponseBodyStatusEnum.Queued]: 'light',
[api.CollectionShowResponseBodyStatusEnum.Pending]: 'light',
[api.EnduroStoredCollectionStatusEnum.Error]: 'danger',
[api.EnduroStoredCollectionStatusEnum.InProgress]: 'warning',
[api.EnduroStoredCollectionStatusEnum.Done]: 'success',
[api.EnduroStoredCollectionStatusEnum.New]: 'secondary',
[api.EnduroStoredCollectionStatusEnum.Unknown]: 'dark',
[api.EnduroStoredCollectionStatusEnum.Abandoned]: 'secondary',
[api.EnduroStoredCollectionStatusEnum.Queued]: 'light',
[api.EnduroStoredCollectionStatusEnum.Pending]: 'light',
};
private variant(): string {
Expand Down
24 changes: 24 additions & 0 deletions ui/src/openapi-generator/.openapi-generator/FILES

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ui/src/openapi-generator/.openapi-generator/VERSION

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

133 changes: 92 additions & 41 deletions ui/src/openapi-generator/apis/BatchApi.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 95813f7

Please sign in to comment.