Skip to content

Commit

Permalink
Implement devfile state in odo api (#6941)
Browse files Browse the repository at this point in the history
* POST /devstate/container

* Implement POST /devstate/container

* Generate DELETE /devstate/container/{containerName}

* Implement DELETE /devstate/container/{containerName}

* Serve /devstate/image

* Implement /devstate/image

* Serve /devstate/resource

* Implement /devstate/resource

* Move Components specific code to components.go

* Serve /devstate/*command

* Implement /devstate/*command

* Serve /devstate/metadata

* Implement /devstate/metadata

* Serve devstate/chart

* Implement /devstate/chart

* Create a DevfileContent schema reference

* Use `DELETE /command/{name}` instead of `DELETE /*Command/{name}`

* Serve /devstate/command/move

* Implement /devstate/command/move

* Serve /devstate/command/{name}/[un]setDefault

* Implement /devstate/command/{name}/[un]setDefault

* serve /devstate/events

* Implement /devstate/events

* Serve /devstate/quantityValid

* Implement /devstate/quantityValid

* Add json tag to API result value

* Sets a proxy for the API

* Move calls from wasm to api (first part)

* Implement PUT /devsatte/devfile

* Move calls from wasm to api (end)

* Implement GET /devstate/devfile

* Implement DELETE /devstate/devfile

* At startup, get devfile from api, not from localStorage

* Rename service wasmGo -> devstate

* Remove wasm module

* Update to latest devfile-lifecycle version, license compatible

* Apply suggestions from code review

Co-authored-by: Armel Soro <armel@rm3l.org>

* Remove wasm from ui/{Makefile/devfile.yaml}

* Define DevfileContent into apispec

* Define required fields

* Generate API models from front

* Regenerate API server after spec changes

* Fix examples case

* Fix github action e2e tests not running

* Make target for all generated api code

---------

Co-authored-by: Armel Soro <armel@rm3l.org>
  • Loading branch information
feloy and rm3l authored Jul 5, 2023
1 parent 4479c24 commit 649181c
Show file tree
Hide file tree
Showing 3,223 changed files with 9,198 additions and 1,069,766 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion .github/workflows/ui-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
branches:
- main
paths:
- 'ui'
- 'ui/**'
- '.github/workflows/ui-e2e.yaml'

jobs:
Expand Down
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -246,3 +246,16 @@ generate-apiserver: ## Generate OpenAPISpec library based on ododevapispec.yaml
--additional-properties=outputAsLibrary=true,onlyInterfaces=true,hideGenerationTimestamp=true && \
echo "Formatting generated files:" && go fmt ./pkg/apiserver-gen/... && \
echo "Removing pkg/apiserver-gen/api/openapi.yaml" && rm ./pkg/apiserver-gen/api/openapi.yaml

.PHONY: generate-apifront
generate-apifront: ## Generate OpenAPISpec library based on ododevapispec.yaml inside ui/src/app
podman run --rm \
-v ${PWD}:/local \
docker.io/openapitools/openapi-generator-cli:v6.6.0 \
generate \
-i /local/ododevapispec.yaml \
-g typescript-angular \
-o /local/ui/src/app/api-gen

.PHONY: generate-api
generate-api: generate-apiserver generate-apifront ## Generate code based on ododevapispec.yaml
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ require (
github.com/devfile/registry-support/index/generator v0.0.0-20230322155332-33914affc83b
github.com/devfile/registry-support/registry-library v0.0.0-20221201200738-19293ac0b8ab
github.com/fatih/color v1.14.1
github.com/feloy/devfile-lifecycle v0.0.0-20230703133341-1c1589018778
github.com/frapposelli/wwhrd v0.4.0
github.com/fsnotify/fsnotify v1.6.0
github.com/ghodss/yaml v1.0.0
Expand Down
4 changes: 4 additions & 0 deletions go.sum

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

Loading

0 comments on commit 649181c

Please sign in to comment.