Skip to content

Fix CLI import #34

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 45 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
db6fadb
Adds draft 6 examples
sixlive Feb 9, 2019
04be69f
Added an additional check for array accessibility
sixlive Feb 18, 2019
441c117
Update index.js
sixlive Jul 11, 2019
f76bd2f
Added changelog for v0.4.0
Oct 4, 2019
b3d2c28
Create FUNDING.yml
Oct 5, 2019
4cba8ad
chore: added release action
Oct 5, 2019
878565f
chore: tweak package
Oct 5, 2019
32e7f14
chore: remove package-lock.json
Oct 5, 2019
27620d7
chore: update contributor link
Oct 5, 2019
afdc901
feat: implement dereferencing
P0lip Oct 6, 2019
ca13b7a
Merge pull request #3 from P0lip/master
Oct 7, 2019
71bef7b
Fix issue with falsy const values not triggering the rewrite
noc7c9 Nov 7, 2019
61f4f07
attribution and consistency
Jan 20, 2020
010956b
improved test and publish
Jan 20, 2020
35f865a
oops wrong date
Jan 20, 2020
ed38775
Merge pull request #5 from noc7c9/master
Jan 20, 2020
4146a27
new workflows
Jan 20, 2020
010c175
thanks stoplight
Jan 20, 2020
623d88c
added scope to readme
Feb 24, 2020
83c4599
BREAKING CHANGE: drop support for nodejs v8
philsturgeon Mar 23, 2020
d2c23e7
feat: rewrite illegal keywords as extensions (#10)
sebas2day Apr 15, 2020
7a107e7
chore: updated stoplight/yaml
Apr 16, 2020
e467aa5
feat: support arrays of types using anyOf (#13)
theoephraim Jul 21, 2020
8d56737
fix: bumped a bunch of dependencies (#20)
philsturgeon Mar 2, 2021
631342c
feat: add type definitions (#21)
George-Payne Mar 17, 2021
f6cf737
fix: do not swallow errors from dereferencing (#22)
taras Jun 3, 2021
b0df26e
feat: add command line to convert files (#24)
diegotremper Jul 29, 2021
90c99dc
fix: change converter return type to a promise (#23)
EmilIvanov Dec 29, 2021
29b2a26
chore: release from main not master
philsturgeon Dec 29, 2021
608b026
chore: test against latest lts only
philsturgeon Dec 29, 2021
de8339f
Create LICENSE
philsturgeon Dec 29, 2021
84cfb28
chore: release fix main
philsturgeon Dec 29, 2021
dfd52c0
changed filesystem resolution to be lazy loaded, bumped package versi…
jonluca Jul 29, 2022
18393ac
BREAKING: Native typescript support, circular references fix
jonluca Aug 2, 2022
3544cdb
feat: windows test bug, add support for derefencing definitions (#30)
jonluca Aug 3, 2022
315747a
fix: clean up some types and small fixes (#31)
jonluca Aug 5, 2022
eaab2be
fix(cli): cli was broken due to bin not included in dist (#33)
jonluca Aug 5, 2022
499e9f5
fix: add suffix to esm import (#35)
jonluca Aug 8, 2022
2e5dabf
Bump json-schema-walker to 1.0.0 to support null default values (#37)
apancutt Aug 19, 2022
538905f
fix(release) create release commit (#38)
jonluca Aug 20, 2022
e5e74e7
fix(esm-path): Fixes esm import path, some typescript errors (#40)
jonluca Nov 7, 2022
ade6d2f
fix: change parsing of type: null to add nullable: true to oneOf/anyO…
jonluca Mar 28, 2023
9318da1
fix: conversion for anyOf type: null to nullable: true (#44)
jonluca Nov 8, 2023
5b05d98
BREAKING CHANGE: Move to yarn 4 and only output a cjs build, drop (of…
jonluca Nov 11, 2023
40d7d94
fix: fix cli import #46
jonluca Dec 11, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 0 additions & 52 deletions .circleci/config.yml

This file was deleted.

12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
charset = utf-8

[*.{ts,js,yaml,scenario,md}]
indent_style = space
indent_size = 2

[*.{ts,js}]
trim_trailing_whitespace = true
insert_final_newline = true
47 changes: 47 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
module.exports = {
env: {
browser: true,
commonjs: true,
es6: true,
node: true,
},
extends: [
'prettier',
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
],
parser: '@typescript-eslint/parser',
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
},
parserOptions: {
ecmaVersion: 2018,
},
plugins: ['prettier', 'unused-imports', '@typescript-eslint'],
rules: {
indent: [
'error',
'tab',
{
SwitchCase: 1,
},
],
'linebreak-style': [
'error',
process.platform === 'win32' ? 'windows' : 'unix',
],
quotes: ['error', 'single'],
semi: ['error', 'always'],
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/consistent-type-definitions': ['error', 'interface'],
'@typescript-eslint/consistent-type-imports': [
'error',
{
prefer: 'type-imports',
},
],
'@typescript-eslint/no-explicit-any': 'off',
},
ignorePatterns: ['dist/**', 'bin/**'],
};
26 changes: 0 additions & 26 deletions .eslintrc.json

This file was deleted.

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

on:
push:
branches:
- main

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: latest
cache: 'yarn'
- run: yarn install --immutable
- run: yarn build
- run: yarn test
- run: npx semantic-release --branches main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
28 changes: 28 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Tests

on: push

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- 18
- 20
- latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- name: yarn install, build, and test
run: |
yarn install --immutable
yarn build
yarn lint
yarn test
env:
CI: true
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ build.sh
.coveralls.yml
.node-version
.nyc_output
yarn.lock
resolved.yaml

# Logs
Expand Down Expand Up @@ -35,3 +34,5 @@ jspm_packages

# Optional REPL history
.node_repl_history
dist
.idea
Binary file added .yarn/install-state.gz
Binary file not shown.
893 changes: 893 additions & 0 deletions .yarn/releases/yarn-4.0.1.cjs

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.0.1.cjs
19 changes: 18 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,42 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]
## [1.0.0] - 2020-01-20

### Changed

- Moved over to the `@openapi-contrib` NPM organization.

## [0.4.0] - 2019-10-04

### Added

- Take the first JSON Schema `example` and put in OpenAPI Schema Object `example`

## [0.3.0] - 2018-12-18

### Added

- Create empty items, as it must always be present for type: array
- Rewrite exclusiveMinimum/exclusiveMaximum
- Rewrite if/then/else as oneOf + allOf
- Rewrite const as single element enum

## [0.2.0] - 2018-05-10

### Fixed

- Implemented [@cloudflare/json-schema-walker] to make sure all subschemas are
processed

[@cloudflare/json-schema-walker]: https://github.com/cloudflare/json-schema-tools#cloudflarejson-schema-walker

## [0.1.1] - 2018-04-09

### Added

- Convert `dependencies` to an allOf + oneOf OpenAPI-valid equivalent
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020 Phil Sturgeon <phil@apisyouwonthate.com>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading