GithubHelp home page GithubHelp logo

apicast-json-to-xml's Introduction

APICast json to XML policy

This is a APICast sample policy, not valid for production usage, that transform response body from json to XML.

Build

This apicast policy needs a new dependency, and this is desired to explain how to add external dependencies on a base image.

Lua-rover

By default, APICast uses lua-rover dependency management, this needs two new files that help to pin dependencies:

$ --> cat Roverfile
luarocks {
        group 'production' {
                module { 'xml2lua' },
        }
}
$ --> cat Roverfile.lock
xml2lua 1.5-2||productionbash-4.4
$ -->

This will fetch dependencies from repositories, that maybe, are not managed by Red Hat at all, so no support is added on this libraries without previous hardening.

To build the policy, a sample Dockerfile is added, and from there all code is created and it's possible to use on APICast or 3Scale operator.

To build, a simple makefile target is added:

make build

Test

To test configuration, the easiest way it's to create a sample config file config.json and use a fake backend auth handler. This is defined on the makefile target test

make test

And to test directly, use the following target:

make test-call

apicast-json-to-xml's People

Contributors

eloycoto 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.