[pkgsite] internal/api: include version queries in param docs

1 view
Skip to first unread message

Ethan Lee (Gerrit)

unread,
May 18, 2026, 11:11:41 PM (9 hours ago) May 18
to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Ethan Lee has uploaded the change for review

Commit message

internal/api: include version queries in param docs

- Update docs to reflect support for version queries.
- Unify formatting to use proper capitalization and punctuation.
Change-Id: I2dbbf6b89ec219b087838a567d93b3753fcd1a7f

Change diff

diff --git a/internal/api/openapi.yaml b/internal/api/openapi.yaml
index ce61165..77ccfff 100644
--- a/internal/api/openapi.yaml
+++ b/internal/api/openapi.yaml
@@ -16,7 +16,7 @@
"operationId": "getImported-by",
"parameters": [
{
- "description": "module path",
+ "description": "Module path.",
"in": "query",
"name": "module",
"schema": {
@@ -24,7 +24,7 @@
}
},
{
- "description": "module version (latest if empty)",
+ "description": "Module version: semantic version, 'latest', or default branches 'master' or 'main'.\n(Latest if empty).",
"in": "query",
"name": "version",
"schema": {
@@ -32,7 +32,7 @@
}
},
{
- "description": "max number of items to return",
+ "description": "Max number of items to return.",
"in": "query",
"name": "limit",
"schema": {
@@ -40,7 +40,7 @@
}
},
{
- "description": "where to resume listing",
+ "description": "Where to resume listing.",
"in": "query",
"name": "token",
"schema": {
@@ -48,7 +48,7 @@
}
},
{
- "description": "include only items matching filter",
+ "description": "Include only items matching the regular expression filter.",
"in": "query",
"name": "filter",
"schema": {
@@ -76,7 +76,7 @@
"operationId": "getModule",
"parameters": [
{
- "description": "module version (latest if empty)",
+ "description": "Module version: semantic version, 'latest', or default branches 'master' or 'main'.\n(Latest if empty).",
"in": "query",
"name": "version",
"schema": {
@@ -120,7 +120,7 @@
"operationId": "getPackage",
"parameters": [
{
- "description": "module path",
+ "description": "Module path.",
"in": "query",
"name": "module",
"schema": {
@@ -128,7 +128,7 @@
}
},
{
- "description": "module version (latest if empty)",
+ "description": "Module version: semantic version, 'latest', or default branches 'master' or 'main'.\n(Latest if empty).",
"in": "query",
"name": "version",
"schema": {
@@ -136,7 +136,7 @@
}
},
{
- "description": "GOOS of documentation build context",
+ "description": "GOOS of documentation build context.",
"in": "query",
"name": "goos",
"schema": {
@@ -144,7 +144,7 @@
}
},
{
- "description": "GOARCH of documentation build context",
+ "description": "GOARCH of documentation build context.",
"in": "query",
"name": "goarch",
"schema": {
@@ -204,7 +204,7 @@
"operationId": "getPackages",
"parameters": [
{
- "description": "module version (latest if empty)",
+ "description": "Module version: semantic version, 'latest', or default branches 'master' or 'main'.\n(Latest if empty).",
"in": "query",
"name": "version",
"schema": {
@@ -212,7 +212,7 @@
}
},
{
- "description": "max number of items to return",
+ "description": "Max number of items to return.",
"in": "query",
"name": "limit",
"schema": {
@@ -220,7 +220,7 @@
}
},
{
- "description": "where to resume listing",
+ "description": "Where to resume listing.",
"in": "query",
"name": "token",
"schema": {
@@ -228,7 +228,7 @@
}
},
{
- "description": "include only items matching filter",
+ "description": "Include only items matching the regular expression filter.",
"in": "query",
"name": "filter",
"schema": {
@@ -272,7 +272,7 @@
}
},
{
- "description": "max number of items to return",
+ "description": "Max number of items to return.",
"in": "query",
"name": "limit",
"schema": {
@@ -280,7 +280,7 @@
}
},
{
- "description": "where to resume listing",
+ "description": "Where to resume listing.",
"in": "query",
"name": "token",
"schema": {
@@ -288,7 +288,7 @@
}
},
{
- "description": "include only items matching filter",
+ "description": "Include only items matching the regular expression filter.",
"in": "query",
"name": "filter",
"schema": {
@@ -316,7 +316,7 @@
"operationId": "getSymbols",
"parameters": [
{
- "description": "module path",
+ "description": "Module path.",
"in": "query",
"name": "module",
"schema": {
@@ -324,7 +324,7 @@
}
},
{
- "description": "module version (latest if empty)",
+ "description": "Module version: semantic version, 'latest', or default branches 'master' or 'main'.\n(Latest if empty).",
"in": "query",
"name": "version",
"schema": {
@@ -332,7 +332,7 @@
}
},
{
- "description": "GOOS of documentation build context",
+ "description": "GOOS of documentation build context.",
"in": "query",
"name": "goos",
"schema": {
@@ -340,7 +340,7 @@
}
},
{
- "description": "GOARCH of documentation build context",
+ "description": "GOARCH of documentation build context.",
"in": "query",
"name": "goarch",
"schema": {
@@ -348,7 +348,7 @@
}
},
{
- "description": "max number of items to return",
+ "description": "Max number of items to return.",
"in": "query",
"name": "limit",
"schema": {
@@ -356,7 +356,7 @@
}
},
{
- "description": "where to resume listing",
+ "description": "Where to resume listing.",
"in": "query",
"name": "token",
"schema": {
@@ -364,7 +364,7 @@
}
},
{
- "description": "include only items matching filter",
+ "description": "Include only items matching the regular expression filter.",
"in": "query",
"name": "filter",
"schema": {
@@ -392,7 +392,7 @@
"operationId": "getVersions",
"parameters": [
{
- "description": "max number of items to return",
+ "description": "Max number of items to return.",
"in": "query",
"name": "limit",
"schema": {
@@ -400,7 +400,7 @@
}
},
{
- "description": "where to resume listing",
+ "description": "Where to resume listing.",
"in": "query",
"name": "token",
"schema": {
@@ -408,7 +408,7 @@
}
},
{
- "description": "include only items matching filter",
+ "description": "Include only items matching the regular expression filter.",
"in": "query",
"name": "filter",
"schema": {
@@ -436,7 +436,7 @@
"operationId": "getVulns",
"parameters": [
{
- "description": "module version (latest if empty)",
+ "description": "Module version: semantic version, 'latest', or default branches 'master' or 'main'.\n(Latest if empty).",
"in": "query",
"name": "version",
"schema": {
@@ -444,7 +444,7 @@
}
},
{
- "description": "max number of items to return",
+ "description": "Max number of items to return.",
"in": "query",
"name": "limit",
"schema": {
@@ -452,7 +452,7 @@
}
},
{
- "description": "where to resume listing",
+ "description": "Where to resume listing.",
"in": "query",
"name": "token",
"schema": {
@@ -460,7 +460,7 @@
}
},
{
- "description": "include only items matching filter",
+ "description": "Include only items matching the regular expression filter.",
"in": "query",
"name": "filter",
"schema": {
diff --git a/internal/api/params.go b/internal/api/params.go
index 1119b11..2fc66ea 100644
--- a/internal/api/params.go
+++ b/internal/api/params.go
@@ -13,23 +13,24 @@

// ListParams are common pagination and filtering parameters.
type ListParams struct {
- // max number of items to return
+ // Max number of items to return.
Limit int `form:"limit"`
- // where to resume listing
+ // Where to resume listing.
Token string `form:"token"`
- // include only items matching filter
+ // Include only items matching the regular expression filter.
Filter string `form:"filter"`
}

// PackageParams are query parameters for /v1beta/package/{path}.
type PackageParams struct {
- // module path
+ // Module path.
Module string `form:"module"`
- // module version (latest if empty)
+ // Module version: semantic version, 'latest', or default branches 'master' or 'main'.
+ // (Latest if empty).
Version string `form:"version"`
- // GOOS of documentation build context
+ // GOOS of documentation build context.
GOOS string `form:"goos"`
- // GOARCH of documentation build context
+ // GOARCH of documentation build context.
GOARCH string `form:"goarch"`
// Documentation format: text, html, md or markdown.
// If omitted, documentation is not returned.
@@ -44,29 +45,32 @@

// SymbolsParams are query parameters for /v1beta/symbols/{path}.
type SymbolsParams struct {
- // module path
+ // Module path.
Module string `form:"module"`
- // module version (latest if empty)
+ // Module version: semantic version, 'latest', or default branches 'master' or 'main'.
+ // (Latest if empty).
Version string `form:"version"`
- // GOOS of documentation build context
+ // GOOS of documentation build context.
GOOS string `form:"goos"`
- // GOARCH of documentation build context
+ // GOARCH of documentation build context.
GOARCH string `form:"goarch"`
ListParams
}

// ImportedByParams are query parameters for /v1beta/imported-by/{path}.
type ImportedByParams struct {
- // module path
+ // Module path.
Module string `form:"module"`
- // module version (latest if empty)
+ // Module version: semantic version, 'latest', or default branches 'master' or 'main'.
+ // (Latest if empty).
Version string `form:"version"`
ListParams
}

// ModuleParams are query parameters for /v1beta/module/{path}.
type ModuleParams struct {
- // module version (latest if empty)
+ // Module version: semantic version, 'latest', or default branches 'master' or 'main'.
+ // (Latest if empty).
Version string `form:"version"`
// Whether to include licenses in the result.
Licenses bool `form:"licenses"`
@@ -81,7 +85,8 @@

// PackagesParams are query parameters for /v1beta/packages/{path}.
type PackagesParams struct {
- // module version (latest if empty)
+ // Module version: semantic version, 'latest', or default branches 'master' or 'main'.
+ // (Latest if empty).
Version string `form:"version"`
ListParams
}
@@ -98,7 +103,8 @@

// VulnParams are query parameters for /v1beta/vulns/{module}.
type VulnParams struct {
- // module version (latest if empty)
+ // Module version: semantic version, 'latest', or default branches 'master' or 'main'.
+ // (Latest if empty).
Version string `form:"version"`
ListParams
}

Change information

Files:
  • M internal/api/openapi.yaml
  • M internal/api/params.go
Change size: M
Delta: 2 files changed, 53 insertions(+), 47 deletions(-)
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
  • requirement is not satisfiedkokoro-CI-Passes
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newchange
Gerrit-Project: pkgsite
Gerrit-Branch: master
Gerrit-Change-Id: I2dbbf6b89ec219b087838a567d93b3753fcd1a7f
Gerrit-Change-Number: 779580
Gerrit-PatchSet: 1
Gerrit-Owner: Ethan Lee <etha...@google.com>
Gerrit-Reviewer: Ethan Lee <etha...@google.com>
unsatisfied_requirement
satisfied_requirement
open
diffy

kokoro (Gerrit)

unread,
May 18, 2026, 11:41:07 PM (8 hours ago) May 18
to Ethan Lee, goph...@pubsubhelper.golang.org, golang...@luci-project-accounts.iam.gserviceaccount.com, Jonathan Amsterdam, Hyang-Ah Hana Kim, golang-co...@googlegroups.com
Attention needed from Ethan Lee, Hyang-Ah Hana Kim and Jonathan Amsterdam

kokoro voted kokoro-CI+1

Kokoro presubmit build finished with status: SUCCESS
Logs at: https://source.cloud.google.com/results/invocations/68db5519-be23-47ca-bfad-24eec16675fa

kokoro-CI+1
Open in Gerrit

Related details

Attention is currently required from:
  • Ethan Lee
  • Hyang-Ah Hana Kim
  • Jonathan Amsterdam
Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement satisfiedTryBots-Pass
    • requirement satisfiedkokoro-CI-Passes
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: pkgsite
    Gerrit-Branch: master
    Gerrit-Change-Id: I2dbbf6b89ec219b087838a567d93b3753fcd1a7f
    Gerrit-Change-Number: 779580
    Gerrit-PatchSet: 1
    Gerrit-Owner: Ethan Lee <etha...@google.com>
    Gerrit-Reviewer: Ethan Lee <etha...@google.com>
    Gerrit-Reviewer: Hyang-Ah Hana Kim <hya...@gmail.com>
    Gerrit-Reviewer: Jonathan Amsterdam <j...@google.com>
    Gerrit-Reviewer: kokoro <noreply...@google.com>
    Gerrit-CC: kokoro <noreply...@google.com>
    Gerrit-Attention: Hyang-Ah Hana Kim <hya...@gmail.com>
    Gerrit-Attention: Jonathan Amsterdam <j...@google.com>
    Gerrit-Attention: Ethan Lee <etha...@google.com>
    Gerrit-Comment-Date: Tue, 19 May 2026 03:41:01 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    unsatisfied_requirement
    satisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages