Giter Site home page Giter Site logo

ern-validator-api's Introduction

DDEX XML Validator

The DDEX Message Validator is an API that provides methods to validate DDEX XML based messages against the set of active schema versions and profile schematrons.

Development Requirements

  • Windows, Linux or MacOS
  • Maven
  • JDK 1.8+

Building

To build the source execute the following maven targets:

mvn clean install

After execution a file with the name ddex-message-validator-api-1.0-SNAPSHOT-bin.zip will appear in 'target/' directory. Unzip the file and and you will see three folders bin, etc, repo. Within the bin folder you will also see start-api.sh and start-api.bat. In your command line you can start the API by typing the following below.

start-api <port>

If a port is not specified the default port is 6060. The default profile has been set to "dev", this can be changed by setting spring.profiles.active environment variable.

In cases where you are using IntelliJ or Eclipse you can also run it from within your IDE locally.

Try the below URL in your browser to see if the service is running.

localhost:6060/api/status

Working with the code

If you don't have a personal IDE preference we recommend you use IntelliJ when working with the code. We use the maven assembly and appassembly plugin for wrapper script packaging support.

Technologies

  • Java
  • Spring
  • Embedded Jetty
  • SAX
  • Logback

The API uses Spring-WebMVC framework which provides a Model-View-Controller architecture. Having a MVC structure in our application allows for the input logic, business logic, and UI logic to be seperated but still have the flexible ability to loosely couple these elements together.

As an alternative to creating a stand-alone bundled WAR app we have incorporated Embedded Jetty as our application instantiator. By doing this you're able to instantiate Jetty within your Java program.

Ways to use API

  • Curl
  • DDEX XML Validator React Client

You can use cURL command line tool to use the API to validate your XML documents.

Schema (XSD) example

curl -X POST -F 'messageSchemaVersionId=ern/341' -F 'messageFile=@location\xml\sme-album.xml' -F 'releaseProfileVersionId=commonreleasetypes/14/AudioAlbumMusicOnly' localhost:6060/api/json/validate

ern-validator-api's People

Contributors

filaruina avatar hsharma86 avatar rdewilder 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.