open-index/open-npm huggingface dataset:
npm package: @nazarethk7/jira-client
Description: Wrapper for the JIRA API
Author: Steven Surowiec
Latest version: 9.0.0

# JavaScript JIRA API for node.js #

A node.js module, which provides an object oriented wrapper for the Jira Rest API.

[![Documentation](https://img.shields.io/badge/Documentation--green.svg)](https://jira-node.github.io/)
[![Jira Rest API](https://img.shields.io/badge/Jira%20Rest%20API--green.svg)](http://docs.atlassian.com/jira/REST/latest/)
[![Run tests](https://github.com/jira-node/node-jira-client/workflows/Run%20tests/badge.svg)](https://github.com/jira-node/node-jira-client/actions)
[![npm](https://img.shields.io/npm/v/jira-client.svg)](https://www.npmjs.com/package/jira-client)
[![Downloads](https://img.shields.io/npm/dm/jira-client.svg)](https://npmjs.com/jira-client)
[![Install Size](https://packagephobia.now.sh/badge?p=jira-client)](https://packagephobia.now.sh/result?p=jira-client)
[![dependency Status](https://david-dm.org/jira-node/node-jira-client/status.svg)](https://david-dm.org/jira-node/node-jira-client)
[![devDependency Status](https://david-dm.org/jira-node/node-jira-client/dev-status.svg)](https://david-dm.org/jira-node/node-jira-client?type=dev)

## Installation ##

Install with the node package manager [npm](http://npmjs.org):

```shell
$ npm install jira-client
```

## Examples ##

### Create the JIRA client ###

```javascript
// With ES5
var JiraApi = require('jira-client');

// With ES6
import JiraApi from 'jira-client';

// Initialize
var jira = new JiraApi({
  protocol: 'https',
  host: 'jira.somehost.com',
  username: 'username',
  password: 'password',
  apiVersion: '2',
  strictSSL: true
});
```

### Find the status of an issue ###

```javascript
// ES5
// We are using an ES5 Polyfill for Promise support. Please note that if you don't explicitly
// apply a catch exceptions will get swallowed. Read up on ES6 Promises for further details.
jira.findIssue(issueNumber)
  .then(function(issue) {
    console.log('Status: ' + issue.fields.status.name);
  })
  .catch(function(err) {
    console.error(err);
  });

// ES6
jira.findIssue(issueNumber)
  .then(issue => {
    console.log(`Status: ${issue.fields.status.name}`);
  })
  .catch(err => {
    console.error(err);
  });

// ES7
async function logIssueName() {
  try {
    const issue = await jira.findIssue(issueNumber);
    console.log(`Status: ${issue.fields.status.name}`);
  } catch (err) {
    console.error(err);
  }
}

```

## Documentation ##
Can't find what you need in the readme?  Check out our documentation here: https://jira-node.github.io/
npm package: @nazariazargul/api-mocker
Description: CLI tool to mock REST endpoints from OpenAPI specifications
Author: Hazar Nazari
Latest version: 1.0.3

# API Mocker

A command-line tool to generate mock REST APIs from OpenAPI/Swagger specifications. This tool helps frontend developers by providing realistic mock data based on your API specification.

## Features

- Generate mock REST APIs from OpenAPI 3.0/Swagger specifications
- Support for path parameters and query parameters
- Realistic mock data generation based on schema types and formats
- Built-in Swagger UI for API documentation
- CORS support for cross-origin requests
- Automatic handling of different response status codes

## Installation

```bash
# Install globally
npm install -g @nazariazargul/api-mocker
```

## Usage

```bash
# Basic usage
api-mocker --path path/to/openapi.yaml --port 3000

# Options
api-mocker --help
```

### Command Line Options

- `--path, -s`: Path to OpenAPI specification file (default: './openapi.yaml')
- `--port, -p`: Port to run the mock server on (default: 3000)

## Mock Data Generation

The tool generates realistic mock data based on the OpenAPI schema:

- Strings: Random strings with format support (date, date-time, email, uri, uuid)
- Numbers: Random numbers within specified ranges
- Integers: Random integers within specified ranges
- Booleans: Random true/false values
- Arrays: 1-3 random items by default
- Objects: All properties mocked according to their schemas
- Enums: Random selection from specified values
- Patterns: Basic regex pattern support

## Example

1. Create an OpenAPI specification file (e.g., `api.yaml`):

```yaml
openapi: 3.0.0
info:
  title: Sample API
  version: 1.0.0
paths:
  /users/{id}:
    get:
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  name:
                    type: string
                  email:
                    type: string
                    format: email
```

2. Run the mock server:

```bash
api-mocker --path api.yaml --port 3000
```

3. Access your mock API:
- API Endpoints: `http://localhost:3000/users/123`
- Swagger UI: `http://localhost:3000/api-docs`

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## License

MIT