<commit_before># swagger1st (swagger first)

[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.sarnowski/swagger1st/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.sarnowski/swagger1st)
[![Dependencies Status](http://jarkeeper.com/sarnowski/swagger1st/status.png)](http://jarkeeper.com/sarnowski/swagger1st)
[![Build Status](https://travis-ci.org/sarnowski/swagger1st.svg?branch=master)](https://travis-ci.org/sarnowski/swagger1st)
[![Coverage Status](https://coveralls.io/repos/sarnowski/swagger1st/badge.svg?branch=master)](https://coveralls.io/r/sarnowski/swagger1st?branch=master)

swagger1st is a Clojure [Ring](https://github.com/ring-clojure/ring) handler that routes, parses and validates requests
based on your [Swagger](http://swagger.io/) definition. Instead of defining routes and validation rules in your code,
you specify your API in the [Swagger 2.0 Specification format](https://github.com/swagger-api/swagger-spec) using
[their great tool set](http://editor.swagger.io/). The resulting definition is the ultimate format for documenting,
sharing and reviewing your API. swagger1st will use it as a configuration file for processing incoming requests. During
runtime, you can inspect and easily test your API with the built-in [Swagger UI](http://petstore.swagger.io/).

## Kickstart

Use the following dependency in your [Leiningen](http://leiningen.org/) project:

    [io.sarnowski/swagger1st "<latest>"]

You find the latest version in [Maven central](http://repo1.maven.org/maven2/io/sarnowski/swagger1st/):

* [![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.sarnowski/swagger1st/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.sarnowski/swagger1st)

The following setup creates a ring compliant handler.

```clojure
(ns example
  (:require [io.sarnowski.swagger1st.core :as s1st]
            [io.sarnowski.swagger1st.util.security :as s1stsec]
            [ring.middleware.params :refer [wrap-params]]))

(def app
  (-> (s1st/context :yaml-cp definition)<commit_msg>use maven central badge from shields.io<commit_after># swagger1st (swagger first)

![Maven Central](https://img.shields.io/maven-central/v/io.sarnowski/swagger1st.svg)
[![Dependencies Status](http://jarkeeper.com/sarnowski/swagger1st/status.png)](http://jarkeeper.com/sarnowski/swagger1st)
[![Build Status](https://travis-ci.org/sarnowski/swagger1st.svg?branch=master)](https://travis-ci.org/sarnowski/swagger1st)
[![Coverage Status](https://coveralls.io/repos/sarnowski/swagger1st/badge.svg?branch=master)](https://coveralls.io/r/sarnowski/swagger1st?branch=master)

swagger1st is a Clojure [Ring](https://github.com/ring-clojure/ring) handler that routes, parses and validates requests
based on your [Swagger](http://swagger.io/) definition. Instead of defining routes and validation rules in your code,
you specify your API in the [Swagger 2.0 Specification format](https://github.com/swagger-api/swagger-spec) using
[their great tool set](http://editor.swagger.io/). The resulting definition is the ultimate format for documenting,
sharing and reviewing your API. swagger1st will use it as a configuration file for processing incoming requests. During
runtime, you can inspect and easily test your API with the built-in [Swagger UI](http://petstore.swagger.io/).

## Kickstart

Use the following dependency in your [Leiningen](http://leiningen.org/) project:

    [io.sarnowski/swagger1st "<latest>"]

You find the latest version in [Maven central](http://repo1.maven.org/maven2/io/sarnowski/swagger1st/):

* ![Maven Central](https://img.shields.io/maven-central/v/io.sarnowski/swagger1st.svg)

The following setup creates a ring compliant handler.

```clojure
(ns example
  (:require [io.sarnowski.swagger1st.core :as s1st]
            [io.sarnowski.swagger1st.util.security :as s1stsec]
            [ring.middleware.params :refer [wrap-params]]))

(def app
  (-> (s1st/context :yaml-cp definition)
{'fraction_non_alphanumeric': 0.13748738647830475, 'fraction_numerical': 0.01160443995963673, 'mean_word_length': 5.109399075500771, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 18, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5117403', 'n_tokens_mistral': 1352, 'n_tokens_neox': 1293, 'n_words': 288}