Skip to content

Commit

Permalink
Merge pull request #1789 from openmeterio/fix/api-typespec
Browse files Browse the repository at this point in the history
Fix: typespec API
  • Loading branch information
tothandras authored Nov 5, 2024
2 parents 28e9c4d + 8cf641a commit 6d2b6c2
Show file tree
Hide file tree
Showing 16 changed files with 1,721 additions and 3,007 deletions.
2 changes: 1 addition & 1 deletion .dagger/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type Generate struct {
func (m *Generate) Openapi() *dagger.File {
file := typespecBase(m.Source.Directory("api/spec")).
WithExec([]string{"pnpm", "compile"}).
File("/work/output/openapi.OpenMeterCloud.yaml").
File("/work/output/openapi.OpenMeter.yaml").
WithName("openapi.yaml")

// https://github.com/microsoft/typespec/issues/2154
Expand Down
12 changes: 9 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,19 @@ down: ## Stop the dependencies via docker compose
$(call print-target)
docker compose down --remove-orphans --volumes

.PHONY: update-openapi
update-openapi: ## Update OpenAPI spec
$(call print-target)
dagger call --source .:default generate openapi -o ./api/openapi.yaml
go generate ./api/...

.PHONY: gen-api
gen-api: ## Generate API and SDKs
$(call print-target)
go generate ./api/...
dagger call generate node-sdk -o api/client/node
dagger call generate web-sdk -o api/client/web
dagger call generate python-sdk -o api/client/python
# dagger call generate node-sdk -o api/client/node
# dagger call generate web-sdk -o api/client/web
# dagger call generate python-sdk -o api/client/python

.PHONY: migrate-check
migrate-check: ## Validate migrations
Expand Down
Loading

0 comments on commit 6d2b6c2

Please sign in to comment.