• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

astronomer / astro-cli / be8b1c54-7a3d-4f57-9917-b5797bc53d98

06 Mar 2026 02:05PM UTC coverage: 35.862% (+0.03%) from 35.835%
be8b1c54-7a3d-4f57-9917-b5797bc53d98

push

circleci

web-flow
fix: replace kin-openapi with libopenapi for OpenAPI 3.1 support (#2032)

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

177 of 233 new or added lines in 5 files covered. (75.97%)

2 existing lines in 1 file now uncovered.

24234 of 67575 relevant lines covered (35.86%)

8.57 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/pkg/openapi/types.go
1
// Package openapi provides utilities for working with OpenAPI specifications.
2
package openapi
3

4
// Endpoint represents a single API endpoint for display and selection.
5
type Endpoint struct {
6
        Method      string
7
        Path        string
8
        OperationID string
9
        Summary     string
10
        Description string
11
        Tags        []string
12
        Parameters  []*Parameter
13
        RequestBody *RequestBody
14
        Responses   *Responses
15
        Deprecated  bool
16
}
17

18
// Parameter represents an API parameter.
19
type Parameter struct {
20
        Name        string
21
        In          string
22
        Description string
23
        Required    bool
24
        Schema      *SchemaRef
25
}
26

27
// RequestBody represents an API request body.
28
type RequestBody struct {
29
        Description string
30
        Required    bool
31
        Content     map[string]*MediaType
32
}
33

34
// MediaType represents a media type with its schema.
35
type MediaType struct {
36
        Schema *SchemaRef
37
}
38

39
// Responses represents a set of API responses keyed by status code.
40
type Responses struct {
41
        Codes []ResponseEntry
42
}
43

44
// ResponseEntry represents a single response code and its details.
45
type ResponseEntry struct {
46
        Code        string
47
        Description string
48
        Content     map[string]*MediaType
49
}
50

51
// Len returns the number of response entries.
NEW
52
func (r *Responses) Len() int {
×
NEW
53
        if r == nil {
×
NEW
54
                return 0
×
NEW
55
        }
×
NEW
56
        return len(r.Codes)
×
57
}
58

59
// SchemaRef wraps a schema with an optional $ref name.
60
type SchemaRef struct {
61
        Ref   string
62
        Value *Schema
63
}
64

65
// Schema represents an OpenAPI schema.
66
type Schema struct {
67
        Type        string
68
        Format      string
69
        Description string
70
        Required    []string
71
        Properties  []SchemaProperty
72
        Items       *SchemaRef
73
        OneOf       []*SchemaRef
74
        AnyOf       []*SchemaRef
75
        AllOf       []*SchemaRef
76
        Enum        []any
77
        Default     any
78
        Example     any
79
        ReadOnly    bool
80
        Deprecated  bool
81
}
82

83
// SchemaProperty represents a named schema property in order.
84
type SchemaProperty struct {
85
        Name   string
86
        Schema *SchemaRef
87
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc