Without tags in your OpenAPI spec, the generated Go grouping/object names will have prefix Default as shown below. With tags, it’s cleaner and more readable.
// Without tags
DefaultAPIService := gen.NewDefaultAPIService()
DefaultAPIController := gen.NewDefaultAPIController(DefaultAPIService)
post:
summary: Create a journal
operationId: CreateJournal
tags:
- Journal
requestBody:
required: true
content:
application/json:
schema:
$ref: "../components/schemas.yaml#/JournalEntryCreate"
responses:
"201":
description: Created
content:
application/json:
schema:
$ref: "../components/schemas.yaml#/JournalEntry"
// With tags
JournalAPIService := gen.NewJournalAPIService()
JournalAPIController := gen.NewJournalAPIController(JournalAPIService)