-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: annotate each path with other release versions #89
Conversation
8f1e665
to
009f0f9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Questions in the diff for my own edification (unless it turns out I stumbled across something missing 🙂)
resource.go
Outdated
// versions affecting the path. This supports navigation across versions. | ||
for _, rc := range resourceVersions.versions { | ||
for path, pathInfo := range rc.Paths { | ||
pathInfo.ExtensionProps.Extensions[ExtSnykApiReleases] = pathReleases[path].Strings() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a bit of code that's automatically adding extension sections to the spec output? I see the data added here, and I see a string representation utility function at the end of the PR, but no updates to have this put in spec, so guessing that's automatic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These extensions are basically being added on load, which gets merged into the compiled result by vervet.Merge
.
The utility function is used to read the value of extensions provided in the source OpenAPI spec.
resource.go
Outdated
@@ -139,31 +144,49 @@ func LoadResourceVersions(epPath string) (*ResourceVersions, error) { | |||
} | |||
|
|||
func LoadResourceVersionsFileset(specYamls []string) (*ResourceVersions, error) { | |||
var eps ResourceVersions | |||
var resourceVersions ResourceVersions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good renaming; what was eps
for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Endpoints.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replies to comments.
resource.go
Outdated
@@ -139,31 +144,49 @@ func LoadResourceVersions(epPath string) (*ResourceVersions, error) { | |||
} | |||
|
|||
func LoadResourceVersionsFileset(specYamls []string) (*ResourceVersions, error) { | |||
var eps ResourceVersions | |||
var resourceVersions ResourceVersions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Endpoints.
resource.go
Outdated
// versions affecting the path. This supports navigation across versions. | ||
for _, rc := range resourceVersions.versions { | ||
for path, pathInfo := range rc.Paths { | ||
pathInfo.ExtensionProps.Extensions[ExtSnykApiReleases] = pathReleases[path].Strings() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These extensions are basically being added on load, which gets merged into the compiled result by vervet.Merge
.
The utility function is used to read the value of extensions provided in the source OpenAPI spec.
009f0f9
to
0b22dbd
Compare
API documentation needs to represent a "changelog" per resource
endpoint: a list of versions in which a change to a given resource
endpoint was released.
This change adds a list of other resource release versions in which a
particular path was declared for such navigation purposes.
Implements #78.