<commit_before># swagger-md
Converts [Swagger API](http://swagger.io) spec to [Markdown format](https://help.github.com/articles/markdown-basics/). 

## Usage

Install NPM module:
```
npm install swagger-md
```

Convert Swagger API spec to Markdown format:
```
import swagger_md from 'swagger-md';
import swagger_spec from './swagger-api-spec.json';

function optionalResponseExampleProvider(path, method) {
  return [
    '```json',
    '{ "foo": 1 }',
    '```',
  ].join('\n');
} 

const markdown_str = swagger_md.convertToMarkdown(swagger_spec, optionalResponseExampleProvider);

// Use markdown_str, e.g. write to "api.md"
```
<commit_msg>fix(docs): hint for CommonJS module environment (#87)<commit_after># swagger-md
Converts [Swagger API](http://swagger.io) spec to [Markdown format](https://help.github.com/articles/markdown-basics/). 

## Usage

Install NPM module:
```
npm install swagger-md
```

Convert Swagger API spec to Markdown format:
```
import swagger_md from 'swagger-md';
import swagger_spec from './swagger-api-spec.json';

function optionalResponseExampleProvider(path, method) {
  return [
    '```json',
    '{ "foo": 1 }',
    '```',
  ].join('\n');
} 

const markdown_str = swagger_md.convertToMarkdown(swagger_spec, optionalResponseExampleProvider);

// Use markdown_str, e.g. write to "api.md"
```

To use the swagger-md in a CommonJS module environment the usage statement should look like:
```
var swagger_md = require('swagger-md').default;
...
```

{'fraction_non_alphanumeric': 0.1572199730094467, 'fraction_numerical': 0.002699055330634278, 'mean_word_length': 4.617424242424242, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '1385952', 'n_tokens_mistral': 515, 'n_tokens_neox': 487, 'n_words': 122}