Code Monkey home page Code Monkey logo

gbfs-java-model's Introduction

gbfs-java-model

Generates Java model from GBFS json schema using jsonschema2pojo with jackson2 annotations.

In order to avoid naming conflicts in generated classes, each feed gets its own package, and all classes are prefixed with "GBFS".

Packages include GBFS versions to accommodate for future releases which may include older versions, since some consumers may need to handle multiple non-compatible versions in the same application (i.e. you should be able to parse v2.1 feeds with the v2.2 package, but v3.0 package would not be able to parse v2.2 feeds).

Special case: gbfs.json

There is no support in jsonschema2pojo to handle "patternProperties" sanely, it will just result in a class without any properties. The gbfs.json feed uses "patternProperties" for the data property to define an object per language, where the language code is the name of the property.

The generated Gbfs class is therefore extended by src/main/org/entur/gbfs/v2_2/gbfs/GBFS.java to override the data property with a Map implementation. This extended class should be used when unmarshalling the gbfs.json feed.

Maven central

This project is available in the central maven repository. See https://search.maven.org/search?q=g:org.entur.gbfs

gbfs-java-model's People

Contributors

hannesj avatar renovate-bot avatar renovate[bot] avatar testower avatar

Watchers

 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.