Skip to content

Commit dbaaa2c

Browse files
Initial open source release: OpenMorph v1.0.0
1 parent 470611a commit dbaaa2c

30 files changed

+2248
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
labels: bug
5+
---
6+
7+
**Describe the bug**
8+
A clear and concise description of what the bug is.
9+
10+
**To Reproduce**
11+
Steps to reproduce the behavior:
12+
13+
1. Go to '...'
14+
2. Run '...'
15+
3. See error
16+
17+
**Expected behavior**
18+
A clear and concise description of what you expected to happen.
19+
20+
**Screenshots**
21+
If applicable, add screenshots to help explain your problem.
22+
23+
**Environment (please complete the following information):**
24+
25+
- OS: [e.g. macOS, Linux]
26+
- OpenMorph version: [e.g. 1.0.0]
27+
28+
**Additional context**
29+
Add any other context about the problem here.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
labels: enhancement
5+
---
6+
7+
**Is your feature request related to a problem? Please describe.**
8+
A clear and concise description of what the problem is. Ex: I'm always frustrated when [...]
9+
10+
**Describe the solution you'd like**
11+
A clear and concise description of what you want to happen.
12+
13+
**Describe alternatives you've considered**
14+
A clear and concise description of any alternative solutions or features you've considered.
15+
16+
**Additional context**
17+
Add any other context or screenshots about the feature request here.

.github/ISSUE_TEMPLATE/question.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
name: Question
3+
about: Ask a question about OpenMorph usage, design, or development
4+
labels: question
5+
---
6+
7+
**What is your question?**
8+
A clear and concise question about OpenMorph, its usage, or its internals.
9+
10+
**Context**
11+
If this is about a specific command, config, or error, please provide details or copy the output here.
12+
13+
**Additional context**
14+
Add any other context, screenshots, or links that might help answer your question.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Pull Request
2+
3+
Thank you for your contribution!
4+
5+
## Description
6+
7+
- What does this PR do?
8+
- Why is it needed?
9+
10+
## Checklist
11+
12+
- [ ] I have run `make lint` and `make test`.
13+
- [ ] I have added/updated tests as needed.
14+
- [ ] I have updated documentation as needed.
15+
16+
## Related Issues
17+
18+
- Closes #(issue)

.github/logo.png

Loading

.github/workflows/ci.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Set up Go
15+
uses: actions/setup-go@v5
16+
with:
17+
go-version: "1.21"
18+
- name: Build
19+
run: make build
20+
- name: Test
21+
run: make test
22+
23+
lint:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v4
27+
- name: Set up Go
28+
uses: actions/setup-go@v5
29+
with:
30+
go-version: "1.21"
31+
- name: Install golangci-lint
32+
run: |
33+
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.56.2
34+
- name: Lint
35+
run: make lint

.github/workflows/release.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Set up Go
14+
uses: actions/setup-go@v5
15+
with:
16+
go-version: "1.21"
17+
- name: Install GoReleaser
18+
uses: goreleaser/goreleaser-action@v5
19+
with:
20+
version: latest
21+
- name: Run GoReleaser
22+
run: goreleaser release --clean
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Validate OpenAPI Specs
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- "openapi/**.yaml"
7+
- "mapping.yaml"
8+
9+
jobs:
10+
transform:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Set up Go
15+
uses: actions/setup-go@v5
16+
with:
17+
go-version: 1.21
18+
- name: Build tool
19+
run: go build -o transform-openapi ./cmd
20+
- name: Run transformation
21+
run: ./transform-openapi --input ./openapi --config mapping.yaml --dry-run --validate

.golangci.yaml

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
# GolangCI-Lint v2.x configuration (clean, no deprecated options)
2+
# See: https://golangci-lint.run/usage/configuration/
3+
4+
linters-settings:
5+
gocyclo:
6+
min-complexity: 15
7+
dupl:
8+
threshold: 100
9+
errcheck:
10+
check-type-assertions: true
11+
staticcheck:
12+
checks: [all]
13+
revive:
14+
confidence: 0.8
15+
severity: warning
16+
rules:
17+
- name: var-naming
18+
- name: indent-error-flow
19+
- name: error-naming
20+
- name: if-return
21+
- name: import-shadowing
22+
- name: range-val-address
23+
- name: time-naming
24+
- name: unexported-return
25+
- name: unused-parameter
26+
- name: unused-receiver
27+
- name: var-declaration
28+
- name: exported
29+
- name: blank-imports
30+
- name: context-as-argument
31+
- name: context-keys-type
32+
- name: error-strings
33+
- name: error-return
34+
- name: errorf
35+
- name: function-length
36+
gofmt:
37+
simplify: true
38+
misspell:
39+
locale: US
40+
41+
run:
42+
timeout: 5m
43+
tests: true
44+
issues-exit-code: 1
45+
modules-download-mode: readonly
46+
allow-parallel-runners: true
47+
48+
issues:
49+
exclude-dirs:
50+
- dist
51+
- vendor
52+
- .git
53+
- .github
54+
- .vscode
55+
- .idea
56+
- node_modules
57+
- testdata
58+
exclude-files:
59+
- ".*_gen.go$"
60+
- ".*_mock.go$"
61+
62+
linters:
63+
enable:
64+
- govet
65+
- errcheck
66+
- staticcheck
67+
- revive
68+
- gofmt
69+
- misspell
70+
- gocyclo
71+
- dupl
72+
disable:
73+
- godox
74+
- lll
75+
- funlen
76+
- wsl
77+
- dogsled
78+
- goconst
79+
- gocritic
80+
- gosec
81+
- depguard
82+
- unparam
83+
- nakedret
84+
- prealloc
85+
- exhaustive
86+
- nestif
87+
- goprintffuncname
88+
- gocognit
89+
- cyclop
90+
- bodyclose
91+
- asasalint
92+
- nlreturn
93+
- noctx
94+
- rowserrcheck
95+
- stylecheck
96+
- typecheck
97+
- unused
98+
- whitespace
99+
- wrapcheck
100+
- forbidigo
101+
- gci
102+
- goheader
103+
- nolintlint
104+
- paralleltest
105+
- testpackage
106+
- thelper
107+
- tparallel
108+
- unconvert
109+
- wastedassign

.goreleaser.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# GoReleaser config for OpenMorph
2+
project_name: transform-openapi
3+
builds:
4+
- main: ./main.go
5+
binary: transform-openapi
6+
ldflags: -s -w
7+
env:
8+
- CGO_ENABLED=0
9+
archives:
10+
- format: tar.gz
11+
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
12+
files:
13+
- LICENSE*
14+
- README.md
15+
- .openapirc.yaml
16+
- cmd/
17+
- internal/
18+
checksum:
19+
name_template: "checksums.txt"
20+
snapshot:
21+
name_template: "{{ .Tag }}-next"
22+
changelog:
23+
sort: desc
24+
filters:
25+
exclude:
26+
- "^docs:"
27+
- "^test:"
28+
release:
29+
github:
30+
owner: kunal-dawar
31+
name: OpenMorph

0 commit comments

Comments
 (0)