Code Monkey home page Code Monkey logo

restxq2swagger's Introduction

restxq2swagger

A existdb XQuery library to create swagger documentation from RestXQ modules.

Install

Pull a fresh copy of this repository, cd into the cloned directory and call ant. A xar package will be generated into the build directory which can be installed into an eXist-db installation

Usage

  1. Create a XQuery module with RestXQ annotations, as usual.
  2. Add some additional annotations to your module functions:

TODO describe

  1. Call with the path to the XQuery module + parameters as a XQuery map
let $params := let $params := map {
        "info.title" := "API's name",
        "info.version" := "version-number",
        "info.description" := "API's description",
        "info.maintainer" := "contact",
        "info.license.name" := "License name",
        "info.license.url" := "License URL",
        "info.tos" := "Link to API's terms of service",
        "host" :="host of the api",
        "basePath" := "base path of the API",
        "basePath-restxq" := "base of the RestXQ path",
        "api:schemes" := "https"
    }
return rxq2s:swaggerize("/db-path-to-module", $params) 

Notes

This repository makes use of Joe Wicentowski's implementation of XQuery 3.1's fn:xml-to-json function, integrated as a git submodule.

restxq2swagger's People

Contributors

dasch124 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

restxq2swagger's Issues

RFE: Support for BaseX and MarkLogic

Both BaseX and MarkLogic support invoking XSLT 2.0 as well as having a rich set of proprietary functions to do stuff with. It would be really awesome if this library could be used on BaseX, MarkLogic as well as eXist.

BaseX supports RESTXQ fully and MarkLogic does too with XQRS.

You could put all proprietary calls in a Module Library which could be switched by different vendors perhaps.

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.