GithubHelp home page GithubHelp logo

eveld / nomad-openapi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hashicorp/nomad-openapi

0.0 0.0 0.0 26.45 MB

OpenAPI specification and related artifacts for HashiCorp Nomad

License: Mozilla Public License 2.0

Makefile 0.02% Go 1.63% Scala 0.02% Java 29.90% JavaScript 18.63% Python 38.72% Rust 11.09%

nomad-openapi's Introduction

HashiCorp Nomad logo

Overview

This repository contains the HashiCorp Nomad OpenAPI specification and related artifacts.

The OpenAPI specification defines a machine-readable schema for describing HTTP APIs. From an OpenAPI specification, clients and servers for your project can be generated in a number of programming languages.

Quick start

The latest version of the OpenAPI specification for the Version 1 Nomad HTTP API can be found in this repository at api/v1/openapi.yaml. This file is itself a generated file and should not be edited directly. You can use this file to generate a client for the Nomad HTTP API in the language of your choice.

The OpenAPI ecosystem has a number of existing code generators to choose from. This repository uses the OpenAPI Generator project to generate a test client in Golang that is then used to validate the generated specification.

To generate a ruby client using the OpenAPI Generator, you can use the following docker command from the root of this repository.

$ mkdir -p /tmp/nomad-openapi && docker run \
	--rm \
	-v "$PWD:/local" \
	-v "/tmp/nomad-openapi:/output" \
	openapitools/openapi-generator-cli:v5.2.0 generate -i /local/v1/openapi.yaml -g ruby -o /output/

Generating a client in a different language should be as straightforward as changing the -g argument in the command above to your language of choice. Check the OpenAPI Generators page for a full list of supported languages.

If you want to generate a client in a language not yet included in the clients directory and submit it for inclusion in this repo, review the Makefile at the root of this repository. Also review the config.yaml file in each client folder. You will need to create a similar file that is specific to your language. Reference the OpenAPI Generator documentation for more information on language specific configuration options.

This repository is currently experimental, and, as such, there is no guarantee of support at this time.

Community Guidelines

The HashiCorp community is a mixture of professionals, volunteers, students, and employees who collaborate to make HashiCorp tools better. Community members play a variety of roles, including mentor, teacher, or connector. If you would like to contribute to HashiCorp products, review our community guidelines which can be found online here.

Issues and Questions

If you have any issues or questions using this package, please raise a Github issue in this repository. Issues raised in the main Nomad repository will be redirected here.

Motivation

The OpenAPI specification is ideal if you are working in a greenfield scenario, and can write your specification first. This spec first approach is highly recommended and widely supported by many of the tool vendors and experts in the OpenAPI space.

However, this approach leaves brownfield projects with an existing API that either predates the OpenAPI specification, or for whatever reason was built with a code first approach, to their own devices in terms of generating a specification from existing code. The code found in the generator directory is one such device. It is highly, experimental, and subject to change.

Contributing

The /v1/openapi.yaml specification file is a generated file that should not be edited manually.

This presentation contains an overview of how to contribute endpoint configurations.

The README file in the generator directory contains a detailed technical overview of the generator package as well as instructions on how to contribute to that package.

Client and API packages are not officially supported packages

The clients and v1 packages found in this repository are not officially supported packages.

nomad-openapi's People

Contributors

derekstrickland avatar jrasell avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.