Skip to content

Commit 40dc3ca

Browse files
author
NyxStack
committed
Correct OpenAPI version references to 3.1.0
1 parent f398512 commit 40dc3ca

File tree

4 files changed

+20
-7
lines changed

4 files changed

+20
-7
lines changed

AGENTS.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,8 @@ schema := &openapi.Schema{
133133
- User wants GraphQL schema
134134
- Only need simple HTTP client
135135
- Building non-API applications
136-
- User expects automatic generation (this is manual construction)
136+
137+
**Note**: If user wants automatic generation, this package is perfect as the foundation - use these types to build generation tools!
137138

138139
### Common Mistakes to Avoid
139140
- **Missing Required Fields**: Always set `Type` in schemas

README.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
# OpenAPI Package
22

3-
Go types and utilities for building OpenAPI 3.0 specifications programmatically.
3+
Go types and utilities for building OpenAPI 3.1.0 specifications programmatically.
4+
5+
## Features
6+
7+
### Supported OpenAPI 3.1.0 Features
8+
9+
-**Complete Specification Support** - All OpenAPI 3.1.0 objects implemented
10+
-**JSON Schema Integration** - Full schema validation and documentation
11+
-**Multiple Content Types** - JSON, XML, form data, file uploads
12+
-**Authentication Schemes** - API keys, OAuth2, HTTP auth
13+
-**Response Linking** - Connect operations through links
14+
-**Webhooks & Callbacks** - Document async operations
15+
-**Examples & Descriptions** - Rich documentation with examples
416

517
## Installation
618

@@ -10,7 +22,7 @@ go get github.com/nyxstack/openapi
1022

1123
## Overview
1224

13-
This package provides Go types that represent the complete OpenAPI 3.0 specification. You use these types to programmatically build OpenAPI documents, then marshal them to JSON or YAML format.
25+
This package provides Go types that represent the complete OpenAPI 3.1.0 specification. You use these types to programmatically build OpenAPI documents, then marshal them to JSON or YAML format.
1426

1527
## Usage
1628

doc.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// Package openapi provides Go types and utilities for building OpenAPI 3.0 specifications.
1+
// Package openapi provides Go types and utilities for building OpenAPI 3.1.0 specifications.
22
//
3-
// This package implements the complete OpenAPI 3.0 specification as Go structs,
3+
// This package implements the complete OpenAPI 3.1.0 specification as Go structs,
44
// allowing you to programmatically build OpenAPI documents and marshal them to JSON or YAML.
55
//
66
// Basic usage:
@@ -17,6 +17,6 @@
1717
// // handle error
1818
// }
1919
//
20-
// The package supports all OpenAPI 3.0 features including schemas, parameters,
20+
// The package supports all OpenAPI 3.1.0 features including schemas, parameters,
2121
// responses, security schemes, callbacks, links, and more.
2222
package openapi

example/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ func buildCompleteAPI() *openapi.Document {
2525
doc := openapi.NewDocument("Pet Store API", "1.0.0")
2626

2727
// Add metadata
28-
doc.WithInfo("A sample Pet Store Server based on the OpenAPI 3.0 specification", "http://swagger.io/terms/").
28+
doc.WithInfo("A sample Pet Store Server based on the OpenAPI 3.1.0 specification", "http://swagger.io/terms/").
2929
WithContact("API Support", "http://www.swagger.io/support", "support@swagger.io").
3030
WithLicense("Apache 2.0", "http://www.apache.org/licenses/LICENSE-2.0.html")
3131

0 commit comments

Comments
 (0)