Skip to content
This repository has been archived by the owner on Mar 14, 2023. It is now read-only.

Commit

Permalink
Merge branch 'release/v1.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
nekofar committed Sep 24, 2021
2 parents ebf4276 + 2b7a4cb commit f6c8a19
Show file tree
Hide file tree
Showing 7 changed files with 309 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
# Files stored in repository root
directory: "/"
# Check for updates every weekday
schedule:
interval: "daily"
# Add assignees
assignees:
- "nekofar"
# Include a list of updated dependencies
commit-message:
prefix: "chore"
include: "scope"
# Specify labels for pull requests
labels:
- "dependencies"
# Allow up to 10 open pull requests for dependencies
open-pull-requests-limit: 10
# Add reviewers
reviewers:
- "nekofar"
# Raise pull requests against the `develop` branch
target-branch: "develop"

# Maintain dependencies for NPM
- package-ecosystem: "npm"
# Files stored in repository root
directory: "/"
# Check for updates every weekday
schedule:
interval: "daily"
# Add assignees
assignees:
- "nekofar"
# Include a list of updated dependencies
commit-message:
prefix: "chore"
include: "scope"
# Specify labels for pull requests
labels:
- "dependencies"
# Allow up to 10 open pull requests for dependencies
open-pull-requests-limit: 10
# Add reviewers
reviewers:
- "nekofar"
# Raise pull requests against the `develop` branch
target-branch: "develop"

44 changes: 44 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Release

on:
push:
tags:
- "v*.*.*"

jobs:
changelog:
name: Generate changelog
runs-on: ubuntu-latest
outputs:
release_body: ${{ steps.release.outputs.RELEASE_BODY }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Generate a changelog
uses: orhun/git-cliff-action@v1
id: git-cliff
with:
config: cliff.toml
args: -vv --latest --strip header
env:
OUTPUT: CHANGES.md

- name: Set the release body
id: release
shell: bash
run: |
r=$(cat ${{ steps.git-cliff.outputs.changelog }})
r="${r//'%'/'%25'}" # Multiline escape sequences for %
r="${r//$'\n'/'%0A'}" # Multiline escape sequences for '\n'
r="${r//$'\r'/'%0D'}" # Multiline escape sequences for '\r'
echo "::set-output name=RELEASE_BODY::$r"
# use release body in the same job
- name: Release on GitHub
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
body: ${{ steps.release.outputs.RELEASE_BODY }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
package-lock.json
build
106 changes: 106 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# Changelog
All notable changes to this project will be documented in this file.

## [1.0.0] - 2021-09-24

### Bug Fixes

- Change indentation of components on main file
- Add missing default response for trades endpoint
- Add missing trailing slash for login endpoint
- Downgrade openapi version due to editor incompatibility
- Change `auth/login` request body content type to multipart
- Replace referenced errors for `auth/login` in docs by real ones
- Add security section for `auth/login`
- Add security section for `auth/logout`
- Change bearer auth type from http to apiKey
- Change `market/stats` request body content type to multipart
- Add missing `operationId` whenever that needed
- Add the missing url for license on openapi
- Change `hours` type from float to number on `market/orders/cancel-old`
- Add base `description` whenever that needed
- Change `description` property type to string over `users/referral/links-list`
- Solve indentation issue over `users/wallets/list` responses
- Replace `examples` by `example` over `v2/orderbook` responses
- Solve some issues over `v2/wallets` responses

### Documentation

- Add the main license file
- Add funding configuration file
- Improve `auth/login` descriptions
- Add summary for `v2/orderbook` endpoint
- Add example for `v2/orderbook` parameters
- Add `externalDocs` for `v2/orderbook` endpoint
- Add `externalDocs` for `v2/trades` endpoint
- Add an example for `v2/trades` endpoint parameters
- Add `externalDocs` for `market/stats` endpoint
- Add an example for `market/stats` endpoint `requestBody`
- Add new global property for `market/stats` endpoint responses
- Add summery and description for `market/stats` endpoint
- Add `externalDocs` for `market/udf/history` endpoint
- Add the readme file
- Add badges to the readme file

### Features

- Add missing `securitySchemes` section
- Add `externalDocs` for `auth/login` endpoint

### Miscellaneous Tasks

- Add main specification file and files and folders structure
- Add `UnexpectedError` response and `Error` schema
- Update auth login structure and schema
- Update `Error` schema
- Update auth logout structure and schema
- Update orderbook structure and schema
- Update trades structure and schema
- Update market stats structure and schema
- Update market udf history structure and schema
- Add a link to external doc for login endpoint
- Add missing summery fields whenever is required
- Ignore trailing slash for `auth/login` and `auth/logout`
- Ignore package lock file
- Add package json config file
- Add `@redocly/openapi-cli:^1.0.0-beta.61` package
- Add custom scripts for lint and build project
- Remove version from package file
- Add `git-clif` config file

### Refactor

- Improve `auth/logout` responses
- Improve example response for `v2/trades` endpoint
- Cleanup endpoints and schema files
- Update the `market/global-stats` structure and schemas
- Replace `patternProperties` by `additionalProperties` on the `market/stats` structure and schemas
- Cleanup endpoints and schema files
- Update the `users/profile` structure and schemas
- Update the `users/login-attempts` structure and schemas
- Update the `users/cards-add` structure and schemas
- Update the `users/accounts-add` structure and schemas
- Update the `users/limitations` structure and schemas
- Update the `users/wallets/list` structure and schemas
- Update the `v2/wallets` structure and schemas
- Update the `users/wallets/balance` structure and schemas
- Update the `users/wallets/transactions/list` structure and schemas
- Update the `users/wallets/deposits/list` structure and schemas
- Update the `users/wallets/generate-address` structure and schemas
- Update the `market/orders/add` structure and schemas
- Update the `market/orders/status` structure and schemas
- Update the `market/orders/list` structure and schemas
- Update the `market/orders/update-status` structure and schemas
- Update the `market/orders/cancel-old` structure and schemas
- Update the `security/emergency-cancel/activate` structure and schemas
- Update the `users/referral/links-list` structure and schemas
- Update the `users/get-referral-code` structure and schemas
- Update the `users/referral/referral-status` structure and schemas
- Update the `users/referral/set-referrer` structure and schemas
- Cleanup endpoints and schema files
- Cleanup endpoints and schema files
- Extract `symbol` parameter from `market/udh/history`
- Extract `symbol` parameter from `v2/orders` and `v2/trades`
- Add `UnexpectedError` to the responses index

<!-- generated by git-cliff -->
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,24 @@
[![GitHub Version][icon-release]][link-release]
[![Workflow Status][icon-workflow]][link-workflow]
[![License][icon-license]][link-license]
[![Twitter: nekofar][icon-twitter]][link-twitter]

# Nobitex Open API Specification

> This is an unofficial open specification based on the `Nobitex` documentation.
## License

The MIT License (MIT). Please see [License File](LICENSE) for more information.

---
[icon-twitter]: https://img.shields.io/twitter/follow/nekofar.svg?style=flat
[icon-release]: https://img.shields.io/github/v/release/nekofar/nobitex-api-openapi-specs?include_prereleases
[icon-license]: https://img.shields.io/github/license/nekofar/nobitex-api-openapi-specs.svg
[icon-workflow]: https://img.shields.io/github/workflow/status/nekofar/nobitex-api-openapi-specs/Tests

[link-twitter]: https://twitter.com/nekofar
[link-release]: https://github.com/nekofar/nobitex-api-openapi-specs/releases
[link-license]: https://github.com/nekofar/nobitex-api-openapi-specs/blob/master/LICENSE
[link-workflow]: https://github.com/nekofar/nobitex-api-openapi-specs/actions/workflows/tests.yml

54 changes: 54 additions & 0 deletions cliff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# configuration file for git-cliff (0.1.0)

[changelog]
# changelog header
header = """
# Changelog
All notable changes to this project will be documented in this file.\n
"""
# template for the changelog body
# https://tera.netlify.app/docs/#introduction
body = """
{% if version %}\
## [{{ version | replace(from="v", to="") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
{% else %}\
## [unreleased]
{% endif %}\
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | upper_first }}
{% for commit in commits %}
- {{ commit.message | upper_first }}\
{% endfor %}
{% endfor %}\n
"""
# remove the leading and trailing whitespaces from the template
trim = true
# changelog footer
footer = """
<!-- generated by git-cliff -->
"""

[git]
# allow only conventional commits
# https://www.conventionalcommits.org
conventional_commits = true
# regex for parsing and grouping commits
commit_parsers = [
{ message = "^feat", group = "Features"},
{ message = "^fix", group = "Bug Fixes"},
{ message = "^docs\\(changelog\\): ", skip = true},
{ message = "^doc", group = "Documentation"},
{ message = "^perf", group = "Performance"},
{ message = "^refactor", group = "Refactor"},
{ message = "^style", group = "Styling"},
{ message = "^test", group = "Testing"},
{ message = "^chore\\(release\\): ", skip = true},
{ message = "^chore", group = "Miscellaneous Tasks"},
{ body = ".*security", group = "Security"},
]
# filter out the commits that are not matched by commit parsers
filter_commits = true
# glob pattern for matching git tags
tag_pattern = "v[0-9]*"
# regex for skipping tags
skip_tags = "v0.1.0-beta.1"
28 changes: 28 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "@nekofar/nobitex-api-openapi-specs",
"description": "This is an unofficial open specification based on the Nobitex documentation.",
"scripts": {
"build": "npx @redocly/openapi-cli bundle src/openapi.yaml --output build/openapi.yaml",
"clean": "rm -r build",
"lint": "npx @redocly/openapi-cli lint src/openapi.yaml --format codeframe"
},
"repository": {
"type": "git",
"url": "git+https://github.com/nekofar/nobitex-api-openapi-spec.git"
},
"keywords": [
"openapi",
"openapi-spec",
"swagger",
"nobitex"
],
"author": "Milad Nekofar <milad@nekofar.com>",
"license": "MIT",
"bugs": {
"url": "https://github.com/nekofar/nobitex-api-openapi-spec/issues"
},
"homepage": "https://github.com/nekofar/nobitex-api-openapi-spec#readme",
"devDependencies": {
"@redocly/openapi-cli": "^1.0.0-beta.61"
}
}

0 comments on commit f6c8a19

Please sign in to comment.