This project contains the specification of the VOTO API. The schema is based on the OpenAPI Specification v3.1.
We saw the need to create a standard set of information for vote advice applications. Therefore, we came up with the idea of defining a standard API while fullfilling the OpenAPI specification format. This allows easy adoption with generated client and server stubs.
You are free to use the specification to generate a client, which can be used for accessing the API. We highly recommend using the api-generator, which is cabable of generating fully usable clients in almost every programming language.
Go into openapi directory and simply build and run our docker image:
docker build -t open-api-generator:latest . && docker run -v ${PWD}/:/app/ -e LANGUAGE=go open-api-generatorYou can specify the LANGUAGE for the generated code using the LANGUAGE environment variable. Check out the list from here. After running, you will find the output folder, where one merged specification file and the generated code stays.
If you want to run everything manually, go to openapi folder and run:
# Install redocly openapi-cli:
npm install @redocly/openapi-cli -g
# Install openapi-generator:
brew install openapi-generator
# Run Linter:
npx @redocly/openapi-cli lint specification.yaml
# Merge files:
npx @redocly/openapi-cli bundle specification.yaml -o ./output/spec-merged.yaml
# Run openapi generator:
openapi-generator-cli generate -i ./spec-merged.yaml -g $LANGUAGE -o ./generated/For more information, please visit: https://github.com/OpenAPITools/openapi-generator