Skip to content

Commit 80ae5d6

Browse files
committed
chore: Stop tracking generated OpenAPI code
- Add /pkg/api/openapi/ to .gitignore - Remove 61 generated files from git tracking - Developers must run 'make generate' after cloning/pulling - Update README with code generation requirements This reduces PR noise and follows best practices for managing auto-generated code. docs: Update README with code generation requirements - Add 'make generate' step to Initial Setup section - Add important note about generated code not being tracked in git - Update code generation workflow documentation - Clarify that developers must run 'make generate' after cloning/pulling
1 parent 4d02bff commit 80ae5d6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+14
-17159
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,6 @@ secrets
4646

4747
# Ignore vendor directory
4848
/vendor/
49+
50+
# Ignore generated OpenAPI code
51+
/pkg/api/openapi/

README.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -200,21 +200,26 @@ Before running hyperfleet-api, ensure these prerequisites are installed. See [PR
200200
go install gotest.tools/gotestsum@latest
201201
go mod download
202202

203-
# 2. Build the binary
203+
# 2. Generate OpenAPI code
204+
make generate
205+
206+
# 3. Build the binary
204207
make binary
205208

206-
# 3. Setup PostgreSQL database
209+
# 4. Setup PostgreSQL database
207210
make db/setup
208211

209-
# 4. Run database migrations
212+
# 5. Run database migrations
210213
./hyperfleet-api migrate
211214

212-
# 5. Verify database schema
215+
# 6. Verify database schema
213216
make db/login
214217
psql -h localhost -U hyperfleet hyperfleet
215218
\dt
216219
```
217220

221+
**Note**: The `pkg/api/openapi/` directory is not tracked in git. You must run `make generate` after cloning or pulling changes to the OpenAPI specification.
222+
218223
### Running the Service
219224

220225
**Local development (no authentication):**
@@ -322,6 +327,8 @@ pkg/api/openapi/api/openapi.yaml (44KB, fully resolved spec)
322327
- Validation tags for required fields
323328
- Fully resolved OpenAPI specification
324329

330+
**Important**: Generated files in `pkg/api/openapi/` are not tracked in git. Developers must run `make generate` after cloning or pulling changes to the OpenAPI specification.
331+
325332
### Runtime Embedding
326333

327334
The fully resolved OpenAPI specification is embedded at compile time using Go 1.16+ `//go:embed`:

pkg/api/openapi/.gitignore

Lines changed: 0 additions & 24 deletions
This file was deleted.

pkg/api/openapi/.openapi-generator-ignore

Lines changed: 0 additions & 23 deletions
This file was deleted.

pkg/api/openapi/.openapi-generator/FILES

Lines changed: 0 additions & 61 deletions
This file was deleted.

pkg/api/openapi/.openapi-generator/VERSION

Lines changed: 0 additions & 1 deletion
This file was deleted.

pkg/api/openapi/.travis.yml

Lines changed: 0 additions & 8 deletions
This file was deleted.

pkg/api/openapi/README.md

Lines changed: 0 additions & 161 deletions
This file was deleted.

0 commit comments

Comments
 (0)