Skip to content

n-th/galadriel

 
 

Repository files navigation

Galadriel

CodeQL PR Build Scorecards supply-chain security trivy

Development

REST API

Server and Client Go code is generated from the OpenAPI definition by oapi-codegen.

Run the following command to generate the code, from the root folder:

oapi-codegen --config=spec/api/schemas.cfg.yaml spec/api/schemas.yaml
oapi-codegen --config=spec/api/harvester.cfg.yaml spec/api/harvester.yaml
oapi-codegen --config=spec/api/management.cfg.yaml spec/api/management.yaml

Run the following command to have a live view of the API documentation:

make api-doc

This will grab the OpenAPI api.yaml file and generate a website for exploring and testing the API. Further changes in your API definition file can be reloaded by refreshing the website (it may require you to hard-refresh to avoid caching issues). The REST API documentation will be available in your browser at http:https://localhost:8000.

Testing

There are a few make targets available to test the code:

  • make test: Runs all tests.
  • make coverage: Runs all unit tests and reports back test coverage. More details can be found in the file ./out/coverage/index.html.

About

No description, website, or topics provided.

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 73.8%
  • Makefile 21.0%
  • Dockerfile 4.5%
  • Shell 0.7%