Skip to content
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

feat!: release v4 #1813

Draft
wants to merge 196 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
196 commits
Select commit Hold shift + click to select a range
94a3635
feat!: convert to use multi parser (#1587)
jonaslagoni Nov 8, 2023
9df2ef4
Merge branch 'master' into next
jonaslagoni Nov 8, 2023
e76e394
feat!: adds support for duration in java (#1604)
kennethaasan Nov 13, 2023
52fd126
chore(release): v3.0.0-next.1 (#1605)
asyncapi-bot Nov 13, 2023
125278e
feat: enable AsyncAPI v3 (#1600)
jonaslagoni Nov 14, 2023
ef56f3e
chore(release): v3.0.0-next.2 (#1606)
asyncapi-bot Nov 14, 2023
3aa1026
fix!: add csharp support for DateTime, TimeSpan, Guid (#1612)
jano-petras Nov 17, 2023
280904c
chore(release): v3.0.0-next.3 (#1615)
asyncapi-bot Nov 17, 2023
0e9f0e7
feat!: adds extend in common, meta, and constrained models (#1613)
kennethaasan Nov 18, 2023
86bd90a
chore(release): v3.0.0-next.4 (#1617)
asyncapi-bot Nov 18, 2023
379c35d
feat!: adds inheritance with interfaces for java (#1593)
kennethaasan Nov 20, 2023
91dfeca
chore(release): v3.0.0-next.5 (#1625)
asyncapi-bot Nov 20, 2023
41c2daf
chore: remove duplicate version entry for AsyncAPI processor (#1609)
jonaslagoni Nov 20, 2023
7ac3259
feat!: render python union in pydantic in the pre 3.10 way (#1626)
kennethaasan Nov 21, 2023
3558b26
chore(release): v3.0.0-next.6 (#1627)
asyncapi-bot Nov 21, 2023
268bfd4
feat: add file path as input (#1601)
nilkanth987 Nov 22, 2023
851f121
chore(release): v3.0.0-next.7 (#1630)
asyncapi-bot Nov 22, 2023
8c836f6
chore: merge branch master into next
jonaslagoni Dec 19, 2023
3cdb662
chore: updated next with master (#1675)
jonaslagoni Dec 19, 2023
396dd69
feat!: add options as parameter to constraints (#1667)
jonaslagoni Dec 26, 2023
d3855c8
chore(release): v3.0.0-next.8 (#1693)
asyncapi-bot Dec 26, 2023
d8f1600
fix: (un)marshalling tuple and dictionary unwrapping for Typescript (…
jonaslagoni Jan 10, 2024
651eaeb
chore(release): v3.0.0-next.9 (#1734)
asyncapi-bot Jan 10, 2024
7cdee96
fix: jsonbinpack preset and runtime tests (#1718)
jonaslagoni Jan 10, 2024
793b385
chore(release): v3.0.0-next.10 (#1735)
asyncapi-bot Jan 10, 2024
b68626f
chore: merge master into next
jonaslagoni Jan 11, 2024
2358a96
chore: fix linting
jonaslagoni Jan 11, 2024
1d30dda
chore: remove unused directory
jonaslagoni Jan 11, 2024
a7c2311
feat: update next with master (#1737)
jonaslagoni Jan 11, 2024
384a16c
feat!: add useJavascriptReservedKeywords option for TS (#1727)
jonaslagoni Jan 12, 2024
b356ca6
chore(release): v3.0.0-next.11 (#1738)
asyncapi-bot Jan 12, 2024
3713983
feat: enable raw properties for interface (#1729)
jonaslagoni Jan 15, 2024
8ca9004
chore(release): v3.0.0-next.12 (#1746)
asyncapi-bot Jan 15, 2024
8787210
fix: newtonsoft could not handle enum values (#1731)
jonaslagoni Jan 15, 2024
a549ba6
chore(release): v3.0.0-next.13 (#1747)
asyncapi-bot Jan 15, 2024
e3b1c96
chore: update Java runtime tests (#1739)
jonaslagoni Jan 16, 2024
75db7c8
Merge branch 'master' into next
jonaslagoni Jan 26, 2024
34b6dc2
fix: edge case where references was incorrect handled for JSON Schema…
jonaslagoni Jan 29, 2024
fae37d6
chore(release): v3.0.0-next.14 (#1759)
asyncapi-bot Jan 29, 2024
fff8192
fix: recursion bug for get nearest dependencies (#1757)
jonaslagoni Jan 29, 2024
9f5b9c5
chore(release): v3.0.0-next.15 (#1765)
asyncapi-bot Jan 30, 2024
73664fb
chore: merge branch 'master' into 'next'
jonaslagoni Jan 30, 2024
bd01eb6
chore: update next with master (#1772)
jonaslagoni Jan 30, 2024
6d9c2c8
Merge branch 'master' into next
jonaslagoni Jan 30, 2024
71b7759
chore: merge branch master into next
jonaslagoni Feb 13, 2024
25b5390
chore: update next with master (#1795)
jonaslagoni Feb 13, 2024
9012c1c
chore(release): v4.0.0-next.1 (#1797)
asyncapi-bot Feb 13, 2024
26bb9ba
fix!: handle edge case in toCamelCase FormatHelper (#1792)
marakalwa Feb 14, 2024
98bf933
chore(release): v4.0.0-next.2 (#1806)
asyncapi-bot Feb 14, 2024
4beffc4
chore: merge branch master into next
jonaslagoni Feb 15, 2024
be2903c
chore: update next with master changes (#1809)
jonaslagoni Feb 15, 2024
8180327
chore(release): v4.0.0-next.3 (#1815)
asyncapi-bot Feb 15, 2024
225f730
feat!: properly implement constants in c# (#1801)
marakalwa Feb 19, 2024
283c873
chore(release): v4.0.0-next.4 (#1822)
asyncapi-bot Feb 19, 2024
1e14060
chore: merge branch 'master-github-upstream' into 'next_update_with_m…
jonaslagoni Feb 27, 2024
4811e7a
chore: update next with master (#1837)
jonaslagoni Feb 27, 2024
aa0f5f1
chore(release): v4.0.0-next.5 (#1838)
asyncapi-bot Feb 27, 2024
35f0dad
fix!: mapping for C# object date (#1834)
JFCote Feb 27, 2024
0d2f4df
chore(release): v4.0.0-next.6 (#1839)
asyncapi-bot Feb 27, 2024
513c489
fix: handle null with new string renderers (#1841)
JFCote Feb 28, 2024
5f6ea52
chore(release): v4.0.0-next.7 (#1844)
asyncapi-bot Feb 28, 2024
2e2c0c2
feat!: python pydantic follows v2 (#1851)
kennethaasan Mar 4, 2024
8ec6814
chore(release): v4.0.0-next.8 (#1852)
asyncapi-bot Mar 4, 2024
83a8468
update implementation and test
jonaslagoni Mar 4, 2024
663191f
chore: revert 83a84680c0d9f21bf95858ff117fff9c57352749
jonaslagoni Mar 4, 2024
9495a40
fix: add serialization alias for Pydantic (#1859)
jonaslagoni Mar 6, 2024
e9272bf
chore(release): v4.0.0-next.9 (#1863)
asyncapi-bot Mar 6, 2024
e0e1741
fix: exclude unwrappable dictionaries for pydantic preset (#1860)
jonaslagoni Mar 6, 2024
741681c
chore(release): v4.0.0-next.10 (#1864)
asyncapi-bot Mar 6, 2024
92908b9
fix: only self hook was called in Go enums (#1855)
jonaslagoni Mar 7, 2024
dca4c98
chore(release): v4.0.0-next.11 (#1866)
asyncapi-bot Mar 7, 2024
0b0f56e
feat: add json serialisation support for golang (#1848)
Souvikns Mar 7, 2024
631d170
chore(release): v4.0.0-next.12 (#1869)
asyncapi-bot Mar 7, 2024
edd4c3d
fix!: use recommended Python styles for names (#1861)
jonaslagoni Mar 9, 2024
d9736b9
chore(release): v4.0.0-next.13 (#1872)
asyncapi-bot Mar 9, 2024
438466a
chore: update next with master (#1875)
jonaslagoni Mar 10, 2024
505f373
chore: revert 438466a3b574a9d1ae2018d0f2d4159b38228d3e
jonaslagoni Mar 10, 2024
9869a67
chore: merge branch master into next
jonaslagoni Mar 10, 2024
0134760
chore: update next with master (#1876)
jonaslagoni Mar 10, 2024
2d62fb8
feat: allow change of how enum is interpreted when a single value (#…
jonaslagoni Mar 10, 2024
cfc2190
chore(release): v4.0.0-next.14 (#1878)
asyncapi-bot Mar 10, 2024
a7c18b9
fix: inconsistent indentation for Python models (#1856)
jonaslagoni Mar 11, 2024
fd56537
chore(release): v4.0.0-next.15 (#1883)
asyncapi-bot Mar 11, 2024
15e406b
fix: python using the wrong key type for dictionaries (#1867)
jonaslagoni Mar 11, 2024
5fad06c
chore(release): v4.0.0-next.16 (#1884)
asyncapi-bot Mar 11, 2024
5da0c62
fix!: add python types, contructor and constants (#1858)
jonaslagoni Mar 13, 2024
1239c9a
chore(release): v4.0.0-next.17 (#1889)
asyncapi-bot Mar 13, 2024
bf6415e
update implementation to handle forward references
jonaslagoni Mar 14, 2024
e7aacdf
chore: revert "update implementation to handle forward references"
jonaslagoni Mar 14, 2024
cbb2410
feat!: use snake case for file names in go (#1894)
kennethaasan Mar 14, 2024
d4d12ad
fix!: fixes tests for windows (#1899)
kennethaasan Mar 14, 2024
036c8bf
fix: fixes tests for windows (#1900)
kennethaasan Mar 14, 2024
0e4cc28
chore(release): v4.0.0-next.18 (#1901)
asyncapi-bot Mar 14, 2024
d786036
feat: enable customization of additional property represenation (#1880)
jonaslagoni Mar 26, 2024
fcf4b7c
chore(release): v4.0.0-next.19 (#1910)
asyncapi-bot Mar 26, 2024
7d69b70
fix: python self referencing property types not using forward referen…
jonaslagoni Mar 26, 2024
6d57910
chore(release): v4.0.0-next.20 (#1911)
asyncapi-bot Mar 26, 2024
ff28234
feat: add Modelina CLI (#1849)
devilkiller-ag Mar 27, 2024
68fa0a0
chore(release): v4.0.0-next.21 (#1915)
asyncapi-bot Mar 27, 2024
0a9e33b
feat: trigger upload resources on next (#1916)
jonaslagoni Mar 27, 2024
03992d3
chore(release): v4.0.0-next.22 (#1917)
asyncapi-bot Mar 27, 2024
9d608c6
fix: cli build script for windows (#1918)
jonaslagoni Mar 27, 2024
baeb3a9
chore(release): v4.0.0-next.23 (#1919)
asyncapi-bot Mar 27, 2024
534837e
ci: fix PR testing on windows (#1912)
jonaslagoni Apr 3, 2024
249ad9f
feat: migrate to new Oclif versions (#1923)
jonaslagoni Apr 3, 2024
b4c85a1
chore(release): v4.0.0-next.24 (#1924)
asyncapi-bot Apr 3, 2024
00ddb78
feat: fix Cli CI packaging pipeline (#1926)
jonaslagoni Apr 3, 2024
97a5d03
chore(release): v4.0.0-next.25 (#1927)
asyncapi-bot Apr 3, 2024
8b1ab56
feat!: add union types support in go (#1882)
Souvikns Apr 4, 2024
a82883e
chore(release): v4.0.0-next.26 (#1931)
asyncapi-bot Apr 4, 2024
89e276d
fix: circular schema issue with OpenAPI, JSON Schema, and swagger inp…
dlkj Apr 11, 2024
47d577f
chore(release): v4.0.0-next.27 (#1935)
asyncapi-bot Apr 11, 2024
981823c
ci: switch to fail slow for Cli release (#1928)
jonaslagoni Apr 14, 2024
7484e9a
docs: update CLI readme and usage documentation (#1925)
jonaslagoni Apr 19, 2024
be36c12
fix: cli windows build not handling local modelina dependency (#1950)
jonaslagoni Apr 22, 2024
f42fb4b
chore(release): v4.0.0-next.28 (#1954)
asyncapi-bot Apr 22, 2024
beb33c0
fix: java does not import correct types (#1948)
jonaslagoni Apr 25, 2024
fb44842
chore(release): v4.0.0-next.29 (#1959)
asyncapi-bot Apr 25, 2024
60d71e4
docs: remove outdated generator docs (#1951)
jonaslagoni Apr 25, 2024
d9b19c2
fix: messages are not being generated for AsyncAPI replies (#1947)
jonaslagoni Apr 25, 2024
725f75b
chore(release): v4.0.0-next.30 (#1961)
asyncapi-bot Apr 25, 2024
b782576
docs: update go language docs (#1960)
jonaslagoni Apr 25, 2024
3882de5
feat!: add support for nullable and optional types in go (#1939)
Souvikns Apr 25, 2024
aad6a41
chore(release): v4.0.0-next.31 (#1962)
asyncapi-bot Apr 25, 2024
2c22282
feat!: adds interface for oneOf objects with discriminator for go (#1…
kennethaasan Apr 25, 2024
153eaa2
chore(release): v4.0.0-next.32 (#1963)
asyncapi-bot Apr 25, 2024
7dd0c71
feat: refactor CLI for integration into AsyncAPI CLI (#1952)
jonaslagoni Apr 25, 2024
b87ddc8
chore(release): v4.0.0-next.33 (#1966)
asyncapi-bot Apr 25, 2024
da14682
fix!: python models not handling circular model dependencies (#1946)
jonaslagoni Apr 25, 2024
4d0bb16
chore(release): v4.0.0-next.34 (#1968)
asyncapi-bot Apr 25, 2024
ecd9618
fix: fixes union type with discriminator in go (#1967)
kennethaasan Apr 25, 2024
6cf5abe
chore(release): v4.0.0-next.35 (#1969)
asyncapi-bot Apr 25, 2024
ec0379c
chore: merge branch 'master-github-upstream' into next
jonaslagoni Apr 25, 2024
7e5c773
chore: merge branch 'next' into update_next_with_master_8
jonaslagoni Apr 25, 2024
8676512
feat: update next with master (#1970)
jonaslagoni Apr 26, 2024
7b26a2a
feat: add Avro Schema input processor (#1753)
akkshitgupta Apr 26, 2024
b601e71
chore(website): fix API docs links (#1972)
jonaslagoni Apr 26, 2024
d1e64d6
ci: make sure release workflow works in next (#1973)
jonaslagoni Apr 26, 2024
6ff9698
fix: type are not determined in cyclic models (#1906)
jonaslagoni May 6, 2024
102faa2
chore(release): v4.0.0-next.36 (#1990)
asyncapi-bot May 6, 2024
a217537
chore: remove blackbox testing (#1976)
jonaslagoni May 6, 2024
f5bf72d
fix: typescript runtime test and tuples (#1980)
jonaslagoni May 6, 2024
9deacc7
chore(release): v4.0.0-next.37 (#1991)
asyncapi-bot May 6, 2024
43b46b7
feat: generate models from components in OpenAPI (#1984)
jonaslagoni May 6, 2024
b249824
chore(release): v4.0.0-next.38 (#1992)
asyncapi-bot May 6, 2024
0d4f8ef
fix!: add unique union types for Python (#1982)
jonaslagoni May 7, 2024
a994e02
chore(release): v4.0.0-next.39 (#1993)
asyncapi-bot May 7, 2024
4a296b7
fix: add go omitempty json tag (#2004)
Souvikns May 21, 2024
fd42901
chore(release): v4.0.0-next.40 (#2011)
asyncapi-bot May 21, 2024
22723e9
fix: include modelina dependency as release for cli (#2008)
jonaslagoni May 21, 2024
35c4781
chore(release): v4.0.0-next.41 (#2012)
asyncapi-bot May 21, 2024
0e2ff4d
feat: add typescript raw option to the CLI (#2009)
jonaslagoni May 21, 2024
faa6bfd
chore(release): v4.0.0-next.42 (#2013)
asyncapi-bot May 21, 2024
0cd15c0
feat: add better reusability for the CLI (#2010)
jonaslagoni May 21, 2024
1c83912
chore(release): v4.0.0-next.43 (#2014)
asyncapi-bot May 21, 2024
94624fe
fix: bug with omitempty tag (#2016)
Souvikns May 23, 2024
cadc868
chore(release): v4.0.0-next.44 (#2017)
asyncapi-bot May 23, 2024
9952ad2
fix: update json tag for Fixing (#2018)
Souvikns May 29, 2024
42c6505
chore(release): v4.0.0-next.45 (#2019)
asyncapi-bot May 29, 2024
c226633
fix: switch CLI run scripts to cjs (#2015)
jonaslagoni Jun 3, 2024
9ea81c2
chore(release): v4.0.0-next.46 (#2021)
asyncapi-bot Jun 3, 2024
48152c8
fix: revert from tarball (#2020)
jonaslagoni Jun 3, 2024
927da51
chore(release): v4.0.0-next.47 (#2022)
asyncapi-bot Jun 3, 2024
bea6f20
feat: enable stringified JSON and YAML for AsyncAPI inputs (#2023)
jonaslagoni Jun 7, 2024
ad97ec8
chore(release): v4.0.0-next.48 (#2027)
asyncapi-bot Jun 7, 2024
4ac03ba
feat: adding support to change the collection type for arrays in Java…
borrull Jun 11, 2024
abd8cbc
chore(release): v4.0.0-next.49 (#2032)
asyncapi-bot Jun 11, 2024
d6a0bdf
feat: json tag support for go union (#2048)
Souvikns Jun 20, 2024
3d2d085
chore(release): v4.0.0-next.50 (#2055)
asyncapi-bot Jun 20, 2024
e717c00
feat!: expand format for integer types for C# (#2054)
jespitae Jun 21, 2024
6a861bc
chore(release): v4.0.0-next.51 (#2057)
asyncapi-bot Jun 21, 2024
64d7342
feat: add --pyDantic to cli for Python and Pydantic preset (#2058)
Pike Jun 22, 2024
efd127a
chore(release): v4.0.0-next.52 (#2060)
asyncapi-bot Jun 22, 2024
7b2701d
fix: add missing fieldtypes for go union types (#2061)
Souvikns Jun 25, 2024
8be050b
chore(release): v4.0.0-next.53 (#2062)
asyncapi-bot Jun 25, 2024
5e8108d
feat!: no setters for enums in interfaces for java when allowInherita…
kennethaasan Jul 15, 2024
e01f011
chore(release): v4.0.0-next.54 (#2070)
asyncapi-bot Jul 15, 2024
9f9fc78
docs: add asyncapi v3 support in readme (#2069)
jonaslagoni Jul 15, 2024
62fd08b
fix: add pydantic dictionary support (#2007)
jonaslagoni Jul 27, 2024
fc84ed4
chore(release): v4.0.0-next.55 (#2082)
asyncapi-bot Jul 27, 2024
cd6b33d
fix: bundle of problems (#2078)
jonaslagoni Aug 13, 2024
55ea213
chore(release): v4.0.0-next.56 (#2086)
asyncapi-bot Aug 13, 2024
6288bc6
fix: csharp json serialization (#2081)
jonaslagoni Aug 13, 2024
f40c346
chore(release): v4.0.0-next.57 (#2087)
asyncapi-bot Aug 13, 2024
faf4673
fix: csharp newtonsoft serialization (#2083)
jonaslagoni Aug 13, 2024
821cc1b
chore(release): v4.0.0-next.58 (#2090)
asyncapi-bot Aug 13, 2024
fcb4eab
fix: make parameter type of ToEnum extension methods dynamic (#2064) …
jonaslagoni Aug 13, 2024
1b561f9
chore(release): v4.0.0-next.59 (#2091)
asyncapi-bot Aug 13, 2024
f6cd360
fix!: when allowInheritance is true, java now renders setters in inte…
kennethaasan Sep 5, 2024
0f3fb58
chore(release): v4.0.0-next.60 (#2097)
asyncapi-bot Sep 5, 2024
95d94d3
fix!: dont render override when the setter doesnt exist in the interf…
kennethaasan Sep 6, 2024
e30832c
chore(release): v4.0.0-next.61 (#2099)
asyncapi-bot Sep 6, 2024
07f39f1
feat!: add jackson annotations additionalProperties (#2103)
memdal Oct 8, 2024
f4976c9
chore(release): v4.0.0-next.62 (#2106)
asyncapi-bot Oct 8, 2024
9f2b80e
fix: python pydantic unwrap properties (#2111)
memdal Oct 30, 2024
df532bd
chore(release): v4.0.0-next.63 (#2121)
asyncapi-bot Oct 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ examples/integrate-with-react
src/processors/TemplateInputProcessor.ts
test/processors/TemplateInputProcessor.spec.ts
modelina-website
modelina-cli

test/runtime/runtime-**
44 changes: 0 additions & 44 deletions .github/workflows/blackbox-testing.yml

This file was deleted.

40 changes: 40 additions & 0 deletions .github/workflows/bump-homebrew-formula.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Bump Homebrew formula for Modelina

on:
# Since now release depends on schedule, might be that there is a situation we cannot wait for schedule and trigger release manually
workflow_dispatch:
# We cannot run brew release continusly every time we release something as sometimes we release a couple of times a day and overload brew pipelines
# More details https://github.com/asyncapi/cli/issues/503
# schedule:
# - cron: "0 23 * * *"

jobs:
bump-formula-in-homebrew:
if: github.repository == 'asyncapi/modelina'
name: Bump the formula in homebrew-core repo
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Get version from package.json
id: extractver
run: echo "version=$(npm run get-version --silent)" >> $GITHUB_OUTPUT
- uses: mislav/bump-homebrew-formula-action@v2
with:
# A PR will be sent to github.com/Homebrew/homebrew-core to update AsyncAPI Modelina formula:
formula-name: modelina
# https://github.com/mislav/bump-homebrew-formula-action/issues/58
formula-path: Formula/a/modelina.rb
tag-name: ${{ steps.extractver.outputs.version }}
download-url: https://registry.npmjs.org/@asyncapi/modelina/-/modelina-${{ steps.extractver.outputs.version }}.tgz #we need to point to npm not github as there is a dist that is not on github
env:
COMMITTER_TOKEN: ${{ secrets.GH_TOKEN_BOT_EVE }}
- if: failure() # Only, on failure, send a message on the 94_bot-failing-ci slack channel
name: Report workflow run status to Slack
uses: 8398a7/action-slack@fbd6aa58ba854a740e11a35d0df80cb5d12101d8 #using https://github.com/8398a7/action-slack/releases/tag/v3.15.1
with:
status: ${{ job.status }}
fields: repo,action,workflow
text: 'AsyncAPI Modelina release to BREW failed'
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CI_FAIL_NOTIFY }}
31 changes: 31 additions & 0 deletions .github/workflows/deploy/chocolatey/asyncapi-modelina.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Do not remove this test for UTF-8: if “Ω” doesn’t appear as greek uppercase omega letter enclosed in quotation marks, you should use an editor that supports UTF-8, not this one. -->
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
<metadata>
<id>modelina</id>
<version>{{version}}</version>
<packageSourceUrl>https://github.com/asyncapi/modelina/releases/v{{version}}</packageSourceUrl>
<owners>AsyncAPI_Initiative</owners>

<!-- == SOFTWARE SPECIFIC SECTION == -->
<!-- This section is about the software itself -->
<title>modelina</title>
<authors>AsyncAPI_Initiative</authors>
<projectUrl>https://www.asyncapi.com/</projectUrl>
<iconUrl>https://avatars.githubusercontent.com/u/16401334?s=200</iconUrl>
<copyright>2024 AsyncAPI Initiative</copyright>
<licenseUrl>https://github.com/asyncapi/modelina/blob/master/LICENSE</licenseUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<releaseNotes>https://github.com/asyncapi/modelina/releases/v{{version}}</releaseNotes>
<projectSourceUrl>https://github.com/asyncapi/modelina</projectSourceUrl>
<docsUrl>https://www.asyncapi.com/docs/tools/modelina</docsUrl>
<bugTrackerUrl>https://github.com/asyncapi/modelina/issues/new/choose</bugTrackerUrl>
<tags>asyncapi-modelina modelina nodejs api asyncapi</tags>
<summary>Modelina CLI to generate any kind of model from any kind of input!</summary>
<description>Modelina CLI to generate any kind of model in TypeScript, Java, Kotlin, C#, C++, and so much more from AsyncAPI, JSON Schema, OpenAPI, TypeScript files, etc!</description>
</metadata>
<files>
<!-- this section controls what actually gets packaged into the Chocolatey package -->
<file src="tools\**" target="tools" />
</files>
</package>
19 changes: 19 additions & 0 deletions .github/workflows/deploy/chocolatey/replace.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
param (
[Parameter(Mandatory=$true)]
[string]$version,
[string]$checksum,
[string]$checksum64
)

$filePaths = @(
'./tools/chocolateyinstall.ps1'
'./modelina.nuspec'
)

foreach ($filePath in $filePaths) {
$fileContents = Get-Content $filePath
$fileContents = $fileContents -replace '{{version}}', $version
$fileContents = $fileContents -replace '{{checksum}}', $checksum
$fileContents = $fileContents -replace '{{checksum64}}', $checksum64
Set-Content $filePath $fileContents
}
26 changes: 26 additions & 0 deletions .github/workflows/deploy/chocolatey/tools/chocolateyinstall.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
$ErrorActionPreference = 'Stop' # stop on all errors
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"

$url = 'https://github.com/asyncapi/modelina/releases/download/v{{version}}/modelina.x86.exe'
$url64 = 'https://github.com/asyncapi/modelina/releases/download/v{{version}}/modelina.x64.exe'

$packageArgs = @{
packageName = $env:ChocolateyPackageName
unzipLocation = $toolsDir
fileType = 'EXE'
url = $url
url64bit = $url64
#file = $fileLocation NOTE: Commented out because we are using url instead

softwareName = 'modelina*'

checksum = '{{checksum}}'
checksumType = 'sha256' #default is md5, can also be sha1, sha256 or sha512
checksum64 = '{{checksum64}}'
checksumType64= 'sha256' #default is checksumType

validExitCodes= @(0, 3010, 1641)
silentArgs = '/S' # NSIS
}

Install-ChocolateyPackage @packageArgs # https://docs.chocolatey.org/en-us/create/functions/install-chocolateypackage
1 change: 1 addition & 0 deletions .github/workflows/if-nodejs-pr-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
)
)
id: should_run
shell: bash
name: Should Run
run: echo "shouldrun=true" >> $GITHUB_OUTPUT
- if: steps.should_run.outputs.shouldrun == 'true'
Expand Down
3 changes: 2 additions & 1 deletion .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 Expand Up @@ -128,4 +129,4 @@ jobs:
fields: repo,action,workflow
text: 'Release workflow failed in release job'
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CI_FAIL_NOTIFY }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CI_FAIL_NOTIFY }}
93 changes: 93 additions & 0 deletions .github/workflows/release-chocolatey.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: Release Chocolatey Package
on:
# We cannot run chocolatey release continuously every time we release something as sometimes we release a couple of times a day and overload chocolatey pipelines
# More details https://github.com/asyncapi/cli/issues/503
# schedule:
# - cron: '0 23 * * *' # Run every day at 23:00 UTC
# Since now release depends on schedule, might be that there is a situation we cannot wait for schedule and trigger release manually
workflow_dispatch:
inputs:
version:
description: 'Version to release (optional)'
required: false

jobs:
release:
name: Publish to Chocolatey Community
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set Version
id: release_version
run: |
if ( "${{ github.event_name }}" -eq "workflow_dispatch" -and "${{ github.event.inputs.version }}" -ne "" ) {
$version = "${{ github.event.inputs.version }}"
}
else {
$version = $(npm pkg get version)
}

$version = $version.Replace("`"", "")
echo "Setting version to $version"
echo "version=$version" >> $env:GITHUB_OUTPUT

- name: Check if this is a new version to release
id: check_new_version
run: |
$output = choco search asyncapi-cli --version=${{ steps.release_version.outputs.version }}
# Output is of the form:
# Chocolatey v2.2.2
# asyncapi-cli 0.0.1 [Approved]
# 1 packages found.
# If the version is not found, the output will of the form:
# Chocolatey v2.2.2
# 0 packages found.
if ($output -match "0 packages found.") {
echo "This is a new version to release"
echo "new_version=true" >> $env:GITHUB_OUTPUT
}
else {
echo "This is not a new version to release"
echo "new_version=false" >> $env:GITHUB_OUTPUT
}
- name: Download release
if: steps.check_new_version.outputs.new_version == 'true'
run: |
echo "Downloading release assets for version ${{ steps.release_version.outputs.version }}"
mkdir -p ./dist
curl -L "https://github.com/asyncapi/modelina/releases/download/v${{ steps.release_version.outputs.version }}/modelina.x64.exe" -o "./modelina-cli/dist/win32/modelina.x64.exe"
curl -L "https://github.com/asyncapi/modelina/releases/download/v${{ steps.release_version.outputs.version }}/modelina.x86.exe" -o "./modelina-cli/dist/win32/modelina.x86.exe"

- name: Get Checksum of the release
id: release_checksum
run: |
$checksum = (Get-FileHash -Path "./modelina-cli/dist/win32/modelina.x86.exe" -Algorithm SHA256).Hash
$checksum64 = (Get-FileHash -Path "./modelina-cli/dist/win32/modelina.x64.exe" -Algorithm SHA256).Hash
echo "Setting checksum to $checksum"
echo "checksum=$checksum" >> $env:GITHUB_OUTPUT
echo "Setting checksum64 to $checksum64"
echo "checksum64=$checksum64" >> $env:GITHUB_OUTPUT

- name: Make nuspec from the template
run: |
cd ./.github/workflows/deploy/chocolatey
pwsh -File ./replace.ps1 -version ${{ steps.release_version.outputs.version }} -checksum ${{ steps.release_checksum.outputs.checksum }} -checksum64 ${{ steps.release_checksum.outputs.checksum64 }}

- name: Run Chocolatey Pack
run: |
cd ./.github/workflows/deploy/chocolatey
choco pack ./modelina.nuspec
choco apikey add --source "'https://push.chocolatey.org/'" --key ${{ secrets.CHOCOLATEY_API_KEY }}
choco push ./modelina.${{ steps.release_version.outputs.version }}.nupkg --source "'https://push.chocolatey.org/'"

- if: failure() # Only, on failure, send a message on the 94_bot-failing-ci slack channel
name: Report workflow run status to Slack
uses: 8398a7/action-slack@fbd6aa58ba854a740e11a35d0df80cb5d12101d8 #using https://github.com/8398a7/action-slack/releases/tag/v3.15.1
with:
status: ${{ job.status }}
fields: repo,action,workflow
text: 'AsyncAPI Modelina release to Chocolatey failed'
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CI_FAIL_NOTIFY }}
89 changes: 89 additions & 0 deletions .github/workflows/upload-release-assets.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: Upload custom assets to GitHub release

on:
# It cannot run on release event as when release is created then version is not yet bumped in package.json
# This means we cannot extract easily latest version and have a risk that package is not yet on npm
push:
branches:
- master
- next

jobs:
upload-assets:
name: Generate and upload assets
if: startsWith(github.event.commits[0].message, 'chore(release):')
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
npm_script: pack:linux
dist_folder: deb
extension: deb
- os: ubuntu-latest
npm_script: pack:tarballs
dist_folder: tar
extension: tar.gz
- os: windows-latest
npm_script: pack:windows
dist_folder: win32
extension: x64.exe
- os: windows-latest
npm_script: pack:windows
dist_folder: win32
extension: x86.exe
- os: macos-latest
npm_script: pack:macos
dist_folder: macos
extension: arm64.pkg
- os: macos-latest
npm_script: pack:macos
dist_folder: macos
extension: x64.pkg
steps:
- name: Set git to use LF #to once and for all finish neverending fight between Unix and Windows
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- 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: "${{ steps.lockversion.outputs.version }}"
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- name: Get version from package.json
uses: actions/github-script@v6
id: extractver
with:
script: |
const packageJson = require('./package.json');
const packageJsonVersion = packageJson.version;
core.setOutput('version', packageJsonVersion);
- name: Install dependencies
run: npm install
- name: Build project
run: npm run prepublishOnly
- name: Assets generation
shell: bash
run: cd modelina-cli && npm run ${{ matrix.npm_script }}
- name: Update release
uses: softprops/action-gh-release@v1
with:
files: modelina-cli/dist/${{ matrix.dist_folder }}/modelina.${{ matrix.extension }}
tag_name: v${{ steps.extractver.outputs.version }}
token: ${{ secrets.GH_TOKEN }}
- if: failure() # Only, on failure, send a message on the 94_bot-failing-ci slack channel
name: Report workflow run status to Slack
uses: 8398a7/action-slack@fbd6aa58ba854a740e11a35d0df80cb5d12101d8 #using https://github.com/8398a7/action-slack/releases/tag/v3.15.1
with:
status: ${{ job.status }}
fields: repo,action,workflow
text: 'AsyncAPI Modelina release build artifacts failed'
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CI_FAIL_NOTIFY }}
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
lib
node_modules
modelina-website
modelina-cli
test/runtime/runtime-**
3 changes: 2 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
"semi": true,
"trailingComma": "none",
"singleQuote": true,
"printWidth": 80
"printWidth": 80,
"endOfLine": "auto"
}
Loading
Loading