Code Monkey home page Code Monkey logo

fabric-java's Introduction

Fabric java SDK

Experimental

Experimental Experimental Fabric SDK for Java. Don't use it in production. Examples demonstrate that this client is usable. Please submit patches and open issues with your experience. This repo contains java code generated from customized Equinix Fabric oas3. The client is generated using the java client support built into the openapi-generator.

Prerequisite:

  1. Jq (https://stedolan.github.io/jq/) : Jq command is used inside makefile to format OAS 3.0 json read from equinix public url.

     brew install jq
    
  2. Docker : We can generate fabric-java client in two ways (described in later section), first is via utilising swagger codegen image to consume fabric OAS 3.0 spec which is provided as option in makefile. To install docker refer : https://docs.docker.com/engine/install/.

  3. Building the API client library requires:

    1. Java 1.7+
    2. Maven

Running sample:

Build generated client:

cd equinix-openapi-fabric
mvn clean package

Sample can be written by consuming local jars produced after building generated fabric-java client:

cd ..
java -classpath "equinix-openapi-fabric/target/equinix-openapi-fabric-1.0.0.jar:equinix-openapi-fabric/target/lib/*" your-example.java

Generate and build equinix fabric java client:

Using openapi generator v3 docker image :

make docker_run

Note : docker pulls latest version of openapi generator.

Contribution guidelines

Patching oas3.0 spec

  1. Make changes in spec/oas3.patched.json dir.
  2. Create a patch file in fabric-java:
    cd spec
    git diff oas3.patched/ > ../patches/spec.fetched.json/<patchfilename>
    cd ..
    
  3. patchfilename should be in format: <patch_index>-<short_patch_decription_or_identifier>.patch
  4. Run make docker_run to reapply the changes to oas spec.
  5. Before pushing changes, commit fabric-java/spec/oas3.patched.json along with the patch file.

fabric-java's People

Contributors

displague avatar djoshi0 avatar ctreatma avatar vdsvm avatar srushti-patl avatar renovate[bot] 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.