Skip to content

Add OpenAPI spec configuration options#52

Merged
moutonjeremy merged 4 commits into
mainfrom
feat-spec-configuration
Jun 2, 2026
Merged

Add OpenAPI spec configuration options#52
moutonjeremy merged 4 commits into
mainfrom
feat-spec-configuration

Conversation

@moutonjeremy

Copy link
Copy Markdown
Member

Introduce configuration options for OpenAPI spec title, description, and version, allowing users to customize the generated API documentation. Default values are provided, and tests ensure correct functionality of these features.

Copilot AI review requested due to automatic review settings June 2, 2026 09:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds user-configurable OpenAPI info metadata (title, description, version) to the Fiber OpenAPI wrapper so generated specs (and auto-served /openapi.json) can reflect application-specific branding/versioning.

Changes:

  • Extend Config with OpenAPITitle, OpenAPIDescription, and OpenAPIVersion, including defaults and merge logic.
  • Use the new config fields when generating the OpenAPI info block.
  • Update README and example app usage; add tests covering defaults, overrides, partial overrides, and auto-served spec behavior.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
types.go Adds new Config fields for OpenAPI info metadata.
fiberoapi.go Provides defaults, merges new config fields, and injects them into the generated OpenAPI spec.
config_test.go Adds tests validating default/custom/partial OpenAPI info behavior and the auto-served JSON route.
README.md Documents new defaults and shows how to override the OpenAPI info block.
_examples/simple/main.go Demonstrates the new info configuration options in an example.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md
Comment thread config_test.go
Comment thread fiberoapi.go
moutonjeremy and others added 3 commits June 2, 2026 11:42
@moutonjeremy
moutonjeremy merged commit 398cf99 into main Jun 2, 2026
4 checks passed
@moutonjeremy
moutonjeremy deleted the feat-spec-configuration branch June 2, 2026 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants