Skip to content

Commit

Permalink
feat!: release version 2 (#1112)
Browse files Browse the repository at this point in the history
* fix!: use preferred ids over anonymous ids (#1099)

* chore(release): v2.0.0-next.1 (#1113)

* fix!: adds union type when operation.message.oneOf is set (#1136)

* chore(release): v2.0.0-next.2 (#1144)

* chore(release): v2.0.0-next.3 (#1146)

* fix!: additionalItems being applied for regular arrays (#1140)

* chore(release): v2.0.0-next.4 (#1151)

* test: upgrades eslint and adds eslint-plugin-jest (#1166)

* fix!: fixes required properties when if/then/else is used (#1149)

* chore(release): v2.0.0-next.5 (#1184)

* chore: update snapshot and packagelock

* chore: update snapshot of example

* feat: force release (#1221)

* chore(release): v2.0.0-next.6 (#1222)

* feat!: handle const and discriminator (#1169)

* feat: handle const

* feat: handle const

* feat: handle const

* feat: handle const

* feat: handle const

* feat: handle const

* feat: handle const

* fixes bug when using oneOf in channel by not adding models to input model if they have already been scanned

* feat: handle const

* feat: handle const

* feat: handle const

* feat: handle const

* feat: handle const

* feat: handle const

* feat: handle const

* feat: set correct java quotes

* remove discriminator from CommonModel because we don't need it

* remove discriminator from CommonModel because we don't need it

* fixes review comments

* adds constant constrainers

* adds constant constrainers

* adds constant constrainers

* adds constant constrainers

* remove unused var

* chore(release): v2.0.0-next.7 (#1242)

* fix!: should not carry over options from metaModel to constrainedModel (#1243)

* chore(release): v2.0.0-next.8 (#1247)

* docs: fixes constant constraints documentation (#1241)

* refactor: adds discriminator in CommonModel and interpreters (#1269)

* refactor: adds discriminator in CommonModel and interpreters

* refactor: adds discriminator in CommonModel and interpreters

* refactor: adds discriminator in MetaModel and ConstrainedMetaModel (#1270)

* refactor: adds discriminator in CommonModel and interpreters

* refactor: adds discriminator in MetaModel and ConstrainedMetaModel

* refactor: adds discriminator in MetaModel and ConstrainedMetaModel

* refactor: adds discriminator in MetaModel and ConstrainedMetaModel

* fix test

* review fix

* fix!: update default Kotlin renderer to make non-required properties nullable (#1277)

* chore(release): v2.0.0-next.9 (#1278)

* feat!: adds interface for oneOf objects for Java (#1271)

* refactor: adds discriminator in CommonModel and interpreters

* refactor: adds discriminator in MetaModel and ConstrainedMetaModel

* feat: adds interface for oneOf objects for Java

* refactor: adds discriminator in MetaModel and ConstrainedMetaModel

* update snapshot

* refactor: adds discriminator in MetaModel and ConstrainedMetaModel

* fix test

* feat: adds interface for oneOf objects for Java

* Revert "feat: adds interface for oneOf objects for Java"

This reverts commit e7bd8fb.

* review fix

* merge fix

* adds tests

* adds documentation

* fixes docs

* Update docs/migrations/version-1-to-2.md

Co-authored-by: Daniel KJ <github@dlkj.co.uk>

* adds test for union without jackson preset

* fixes docs

* fixes docs

* fixes docs

---------

Co-authored-by: Daniel KJ <github@dlkj.co.uk>

* chore(release): v2.0.0-next.10 (#1279)

* chore: update Rust union render to use ConstrainedMetaModelOptionsDiscriminator (#1282)

Update Rust union render to use `ConstrainedMetaModelOptionsDiscriminator`

Co-authored-by: Daniel Kenyon-Jones <daniel.kenyon-jones@featurespace.co.uk>

* fix wrong import

* Revert "fix wrong import"

This reverts commit b6c5be6.

* fix: wrong import for Java preset (#1283)

fix: wrong import

* chore(release): v2.0.0-next.11 (#1286)

* feat!: add discriminator support for OpenAPI v3 and Swagger v2 (#1281)


Co-authored-by: Daniel Kenyon-Jones <daniel.kenyon-jones@featurespace.co.uk>

* chore(release): v2.0.0-next.12 (#1287)

* feat!: use EXISTING_PROPERTY as JsonTypeInfo.As annotation to avoid duplicates when serializing (#1290)

* chore(release): v2.0.0-next.13 (#1291)

* chore: blackbox tests (#1303)


Co-authored-by: Daniel Kenyon-Jones <daniel.kenyon-jones@featurespace.co.uk>

* feat!: enable nullable models (#1141)

* chore(release): v2.0.0-next.14 (#1313)

* chore: update new generators with next syntax

* chore: fix linting problem

* feat!: add java oneOf union support for properties of models  (#1296)


Co-authored-by: Daniel Kenyon-Jones <daniel.kenyon-jones@featurespace.co.uk>

* chore: update dependency

* feat: update dependencies

* feat: update dependencies

* feat: update dependencies

* feat: trigger release and update dependencies (#1428)

* ci: temporarily enable release for next (#1430)

* fix: ts/js unmarshalling function bug (#1429)

* fix!: support java nullable double type (#1439)

Co-authored-by: Daniel Kenyon-Jones <daniel.kenyon-jones@featurespace.co.uk>

* feat: update release configuration and trigger release (#1467)

* chore(release): v2.0.0-next.15 (#1468)

* feat: make discriminator property visible to deserializer from Java Jackson preset (#1469)


Co-authored-by: Daniel Kenyon-Jones <daniel.kenyon-jones@featurespace.co.uk>

* chore(release): v2.0.0-next.16 (#1470)

* fix: typescript interface variable assignment (#1472)


Co-authored-by: Kristupas Narkeliunas <kristupas.narkeliun@ihsmarkit.com>

* chore(release): v2.0.0-next.17 (#1473)

* feat!: upgrade to node 18 (#1422)

* upgrade to v18

* adapt rest of workflows

* update readme

* recommit packagelock

* feat!: supports optional properties in java (#1485)

* chore(release): v2.0.0-next.18 (#1487)

* chore: add next integration example (#1488)

* fix: adds format in options instead of using original input (#1486)

* chore(release): v2.0.0-next.19 (#1492)

* feat!: generate models for OpenAPI parameters (#1498)


Co-authored-by: Daniel Kenyon-Jones <daniel.kenyon-jones@featurespace.co.uk>

* chore(release): v2.0.0-next.20 (#1500)

* fix: fixes java jackson discriminator when property is not camel case (#1502)

* chore(release): v2.0.0-next.21 (#1504)

* fix: fixes performance issues in java when calling parent unions (#1501)

* chore(release): v2.0.0-next.22 (#1506)

* feat!: refactors generators to use the same arg types (#1505)

* chore(release): v2.0.0-next.23 (#1507)

* fix: escape java string literals used for regex patterns and string constants (#1509)


Co-authored-by: Daniel Kenyon-Jones <kenyonjd@featurespace.co.uk>

* chore(release): v2.0.0-next.24 (#1558)

* chore: update linting and dev dependency versions

* chore: update migration guide (#1560)

* chore(release): v2.0.0-next.25 (#1571)

---------

Co-authored-by: Kenneth Aasan <k.aasan@sportradar.com>
Co-authored-by: asyncapi-bot <bot+chan@asyncapi.io>
Co-authored-by: Cyprian Gracz <cyprian.gracz@micro-jumbo.eu>
Co-authored-by: Daniel KJ <github@dlkj.co.uk>
Co-authored-by: Daniel Kenyon-Jones <daniel.kenyon-jones@featurespace.co.uk>
Co-authored-by: Kristupas <53404771+Ksisa@users.noreply.github.com>
Co-authored-by: Kristupas Narkeliunas <kristupas.narkeliun@ihsmarkit.com>
Co-authored-by: Daniel Kenyon-Jones <kenyonjd@featurespace.co.uk>
  • Loading branch information
9 people authored Oct 17, 2023
1 parent e6899e4 commit 26b29dc
Show file tree
Hide file tree
Showing 247 changed files with 28,368 additions and 17,345 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ lib
output
src/generators/template
test/generators/template
examples/integrate-with-next
examples/integrate-with-react
src/processors/TemplateInputProcessor.ts
test/processors/TemplateInputProcessor.spec.ts
Expand Down
85 changes: 30 additions & 55 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"sonarjs",
"security",
"github",
"jest",
"prettier"
],
"extends": [
Expand All @@ -13,15 +14,22 @@
"plugin:@typescript-eslint/recommended",
"plugin:sonarjs/recommended",
"plugin:security/recommended",
"plugin:jest/recommended",
"prettier"
],
"env": {
"jest/globals": true
},
"rules": {
"strict": 0,
"github/array-foreach": 2,
"eol-last": ["error", "always"],
"@typescript-eslint/no-explicit-any": 0,
"require-await": "error",
"@typescript-eslint/explicit-module-boundary-types": ["error", {"allowArgumentsExplicitlyTypedAsAny": true}],
"@typescript-eslint/explicit-module-boundary-types": [
"error",
{ "allowArgumentsExplicitlyTypedAsAny": true }
],
"sonarjs/no-small-switch": "off",
"no-underscore-dangle": "error",
"no-process-exit": "error",
Expand All @@ -30,10 +38,7 @@
"curly": ["error"],
"no-multi-spaces": "error",
"consistent-return": 0,
"consistent-this": [
0,
"self"
],
"consistent-this": [0, "self"],
"func-style": 0,
"max-nested-callbacks": ["error", 3],
"camelcase": 0,
Expand All @@ -60,15 +65,8 @@
"no-throw-literal": 2,
"no-void": 2,
"radix": 2,
"wrap-iife": [
2,
"outside"
],
"wrap-iife": [2, "outside"],
"no-shadow": 0,
"no-use-before-define": [
2,
"nofunc"
],
"no-path-concat": 2,
"valid-jsdoc": [
0,
Expand All @@ -89,29 +87,17 @@
],
"no-lonely-if": 2,
"no-floating-decimal": 2,
"comma-style": [
2,
"last"
],
"comma-style": [2, "last"],
"no-multiple-empty-lines": [
2,
{
"max": 1
}
],
"no-nested-ternary": 2,
"operator-assignment": [
2,
"always"
],
"padded-blocks": [
2,
"never"
],
"quote-props": [
2,
"as-needed"
],
"operator-assignment": [2, "always"],
"padded-blocks": [2, "never"],
"quote-props": [2, "as-needed"],
"keyword-spacing": [
2,
{
Expand All @@ -120,22 +106,10 @@
"overrides": {}
}
],
"space-before-blocks": [
2,
"always"
],
"array-bracket-spacing": [
2,
"never"
],
"computed-property-spacing": [
2,
"never"
],
"space-in-parens": [
2,
"never"
],
"space-before-blocks": [2, "always"],
"array-bracket-spacing": [2, "never"],
"computed-property-spacing": [2, "never"],
"space-in-parens": [2, "never"],
"space-unary-ops": [
2,
{
Expand All @@ -147,10 +121,7 @@
"wrap-regex": 2,
//"linebreak-style": ["error", "unix"],
"linebreak-style": 0,
"semi": [
2,
"always"
],
"semi": [2, "always"],
"arrow-spacing": [
2,
{
Expand All @@ -162,17 +133,21 @@
"no-const-assign": 2,
"no-this-before-super": 2,
"no-var": 2,
"object-shorthand": [
2,
"always"
],
"object-shorthand": [2, "always"],
"prefer-arrow-callback": 2,
"prefer-const": 2,
"prefer-spread": 2,
"prefer-template": 2,
"@typescript-eslint/no-unused-vars": 2,
"prettier/prettier": 2,
"sonarjs/no-identical-functions": "off"
"sonarjs/no-identical-functions": "off",
"sonarjs/prefer-single-boolean-return": "off",
"jest/valid-title": [
2,
{
"ignoreTypeOfDescribeName": true
}
]
},
"overrides": [
{
Expand Down Expand Up @@ -203,4 +178,4 @@
}
}
]
}
}
11 changes: 8 additions & 3 deletions .github/workflows/blackbox-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,16 @@ jobs:
os: [ubuntu-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Check package-lock version
uses: asyncapi/.github/.github/actions/get-node-version-from-package-lock@master
id: lockversion
- name: Setup Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: 14
node-version: "${{ steps.lockversion.outputs.version }}"
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- name: Build library
run: npm install && npm run build
- uses: actions/setup-java@v2
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/coverall.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,17 @@ jobs:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v3
- name: Check package-lock version
uses: asyncapi/.github/.github/actions/get-node-version-from-package-lock@master
id: lockversion
- name: Setup Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: 14
node-version: "${{ steps.lockversion.outputs.version }}"
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- name: npm install, run test
run: |
npm install
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/if-nodejs-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ on:
- next-major-spec
- beta
- alpha
- next

jobs:

Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/runtime-cplusplus-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Check package-lock version
uses: asyncapi/.github/.github/actions/get-node-version-from-package-lock@master
id: lockversion
- name: Setup Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: 14
node-version: "${{ steps.lockversion.outputs.version }}"
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- name: Build library
run: npm install && npm run build:prod
- name: Setup Cpp (C++ / C)
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/runtime-java-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Check package-lock version
uses: asyncapi/.github/.github/actions/get-node-version-from-package-lock@master
id: lockversion
- name: Setup Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: 14
node-version: "${{ steps.lockversion.outputs.version }}"
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- name: Build library
run: npm install && npm run build:prod
- uses: actions/setup-java@v2
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/runtime-kotlin-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Check package-lock version
uses: asyncapi/.github/.github/actions/get-node-version-from-package-lock@master
id: lockversion
- name: Setup Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: 14
node-version: "${{ steps.lockversion.outputs.version }}"
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- name: Build library
run: npm install && npm run build:prod
- name: Setup Java
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/runtime-php-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,16 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Check package-lock version
uses: asyncapi/.github/.github/actions/get-node-version-from-package-lock@master
id: lockversion

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 14
node-version: "${{ steps.lockversion.outputs.version }}"
cache: 'npm'
cache-dependency-path: '**/package-lock.json'

- name: Build library
run: npm install && npm run build:prod
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/runtime-rust-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,17 @@ jobs:
if: "github.event.pull_request.draft == false &&!((github.actor == 'asyncapi-bot' && startsWith(github.event.pull_request.title, 'ci: update global workflows')) || (github.actor == 'asyncapi-bot' && startsWith(github.event.pull_request.title, 'chore(release):')) || (github.actor == 'allcontributors' && startsWith(github.event.pull_request.title, 'docs: add')))"
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v3
- name: Check package-lock version
uses: asyncapi/.github/.github/actions/get-node-version-from-package-lock@master
id: lockversion
- name: Setup Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: 14
node-version: "${{ steps.lockversion.outputs.version }}"
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- name: Build library
run: npm install && npm run build:prod
- name: Install Rust
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/runtime-typescript-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,17 @@ jobs:
if: "github.event.pull_request.draft == false &&!((github.actor == 'asyncapi-bot' && startsWith(github.event.pull_request.title, 'ci: update global workflows')) || (github.actor == 'asyncapi-bot' && startsWith(github.event.pull_request.title, 'chore(release):')) || (github.actor == 'allcontributors' && startsWith(github.event.pull_request.title, 'docs: add')))"
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v3
- name: Check package-lock version
uses: asyncapi/.github/.github/actions/get-node-version-from-package-lock@master
id: lockversion
- name: Setup Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: 14
node-version: "${{ steps.lockversion.outputs.version }}"
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- name: Build library
run: npm install && npm run build:prod
- name: Generate TypeScript models
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/website-pr-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,17 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Checkout repository
uses: actions/checkout@v3
- name: Check package-lock version
uses: asyncapi/.github/.github/actions/get-node-version-from-package-lock@master
id: lockversion
- name: Setup Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: 14
node-version: "${{ steps.lockversion.outputs.version }}"
cache: 'npm'
cache-dependency-path: '**/package-lock.json'

- name: Modelina Core Install dependencies
id: first-installation-core
run: npm install --loglevel verbose
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v14
v18
2 changes: 2 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ branches:
prerelease: true
- name: alpha
prerelease: true
- name: next
prerelease: true
plugins:
- - "@semantic-release/commit-analyzer"
- preset: conventionalcommits
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ This is the roadmap that is currently in focus by the [CODEOWNERS](./CODEOWNERS)
## Requirements
The following are a requirement in order to use Modelina.

- [NodeJS](https://nodejs.org/en/) >= 14
- [NodeJS](https://nodejs.org/en/) >= 18

## Documentation
A feature in Modelina cannot exists without an example and documentation for it. You can find all the [documentation here](./docs/README.md).
Expand Down
3 changes: 3 additions & 0 deletions docs/constraints/CSharp.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,6 @@ These are the constraints that is applied to enum keys. The `Rule key` is what y
|NO_RESERVED_KEYWORDS|No reserved keywords|C# has a list of reserved keywords ([see the full list here](../../src/generators/csharp/Constants.ts))|
|NAMING_FORMATTER|Must be formatted equally|Model name is formatted using pascal case|
|NO_DUPLICATE_KEYS|No duplicate enum keys|If any of the above constraints changes the enum key, we must make sure that no duplicates exist within the same enum. If any is encountered `reserved_` is pre-pended. This is done recursively until no duplicates are found.|

## Constant
Constant constraints are currently not supported for CSharp.
Loading

0 comments on commit 26b29dc

Please sign in to comment.