Skip to content

Commit

Permalink
RHINENG-10747: limit=-1 is not allowed
Browse files Browse the repository at this point in the history
  • Loading branch information
psegedy committed Jun 17, 2024
1 parent 20edbdf commit 2564dc4
Show file tree
Hide file tree
Showing 14 changed files with 40 additions and 40 deletions.
40 changes: 20 additions & 20 deletions docs/v3/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
{
"name": "limit",
"in": "query",
"description": "Limit for paging, set -1 to return all",
"description": "Limit for paging",
"schema": {
"type": "integer"
}
Expand Down Expand Up @@ -339,7 +339,7 @@
{
"name": "limit",
"in": "query",
"description": "Limit for paging, set -1 to return all",
"description": "Limit for paging",
"schema": {
"type": "integer"
}
Expand Down Expand Up @@ -582,7 +582,7 @@
{
"name": "limit",
"in": "query",
"description": "Limit for paging, set -1 to return all",
"description": "Limit for paging",
"schema": {
"type": "integer"
}
Expand Down Expand Up @@ -1041,7 +1041,7 @@
{
"name": "limit",
"in": "query",
"description": "Limit for paging, set -1 to return all",
"description": "Limit for paging",
"schema": {
"type": "integer"
}
Expand Down Expand Up @@ -2934,7 +2934,7 @@
{
"name": "limit",
"in": "query",
"description": "Limit for paging, set -1 to return all",
"description": "Limit for paging",
"schema": {
"type": "integer"
}
Expand Down Expand Up @@ -3190,7 +3190,7 @@
{
"name": "limit",
"in": "query",
"description": "Limit for paging, set -1 to return all",
"description": "Limit for paging",
"schema": {
"type": "integer"
}
Expand Down Expand Up @@ -3539,7 +3539,7 @@
{
"name": "limit",
"in": "query",
"description": "Limit for paging, set -1 to return all",
"description": "Limit for paging",
"schema": {
"type": "integer"
}
Expand Down Expand Up @@ -3670,7 +3670,7 @@
{
"name": "limit",
"in": "query",
"description": "Limit for paging, set -1 to return all",
"description": "Limit for paging",
"schema": {
"type": "integer"
}
Expand Down Expand Up @@ -3838,7 +3838,7 @@
{
"name": "limit",
"in": "query",
"description": "Limit for paging, set -1 to return all",
"description": "Limit for paging",
"schema": {
"type": "integer"
}
Expand Down Expand Up @@ -4242,7 +4242,7 @@
{
"name": "limit",
"in": "query",
"description": "Limit for paging, set -1 to return all",
"description": "Limit for paging",
"schema": {
"type": "integer"
}
Expand Down Expand Up @@ -4402,7 +4402,7 @@
{
"name": "limit",
"in": "query",
"description": "Limit for paging, set -1 to return all",
"description": "Limit for paging",
"schema": {
"type": "integer"
}
Expand Down Expand Up @@ -4533,7 +4533,7 @@
{
"name": "limit",
"in": "query",
"description": "Limit for paging, set -1 to return all",
"description": "Limit for paging",
"schema": {
"type": "integer"
}
Expand Down Expand Up @@ -4812,7 +4812,7 @@
{
"name": "limit",
"in": "query",
"description": "Limit for paging, set -1 to return all",
"description": "Limit for paging",
"schema": {
"type": "integer"
}
Expand Down Expand Up @@ -4988,7 +4988,7 @@
{
"name": "limit",
"in": "query",
"description": "Limit for paging, set -1 to return all",
"description": "Limit for paging",
"schema": {
"type": "integer"
}
Expand Down Expand Up @@ -5069,7 +5069,7 @@
{
"name": "limit",
"in": "query",
"description": "Limit for paging, set -1 to return all",
"description": "Limit for paging",
"schema": {
"type": "integer"
}
Expand Down Expand Up @@ -5596,7 +5596,7 @@
{
"name": "limit",
"in": "query",
"description": "Limit for paging, set -1 to return all",
"description": "Limit for paging",
"schema": {
"type": "integer"
}
Expand Down Expand Up @@ -5756,7 +5756,7 @@
{
"name": "limit",
"in": "query",
"description": "Limit for paging, set -1 to return all",
"description": "Limit for paging",
"schema": {
"type": "integer"
}
Expand Down Expand Up @@ -6026,7 +6026,7 @@
{
"name": "limit",
"in": "query",
"description": "Limit for paging, set -1 to return all",
"description": "Limit for paging",
"schema": {
"type": "integer"
}
Expand Down Expand Up @@ -6546,7 +6546,7 @@
{
"name": "limit",
"in": "query",
"description": "Limit for paging, set -1 to return all",
"description": "Limit for paging",
"schema": {
"type": "integer"
}
Expand Down Expand Up @@ -6699,7 +6699,7 @@
{
"name": "limit",
"in": "query",
"description": "Limit for paging, set -1 to return all",
"description": "Limit for paging",
"schema": {
"type": "integer"
}
Expand Down
4 changes: 2 additions & 2 deletions manager/controllers/advisories.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func advisoriesCommon(c *gin.Context) (*gorm.DB, *ListMeta, []string, error) {
// @Security RhIdentity
// @Accept json
// @Produce json
// @Param limit query int false "Limit for paging, set -1 to return all"
// @Param limit query int false "Limit for paging"
// @Param offset query int false "Offset for paging"
// @Param sort query string false "Sort field" Enums(id,advisory_type_name,synopsis,public_date,severity,installable_systems,applicable_systems)
// @Param search query string false "Find matching text"
Expand Down Expand Up @@ -165,7 +165,7 @@ func AdvisoriesListHandler(c *gin.Context) {
// @Security RhIdentity
// @Accept json
// @Produce json
// @Param limit query int false "Limit for paging, set -1 to return all"
// @Param limit query int false "Limit for paging"
// @Param offset query int false "Offset for paging"
// @Param sort query string false "Sort field" Enums(id,name,advisory_type,synopsis,public_date,applicable_systems)
// @Param search query string false "Find matching text"
Expand Down
4 changes: 2 additions & 2 deletions manager/controllers/advisory_systems.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func advisorySystemsCommon(c *gin.Context) (*gorm.DB, *ListMeta, []string, error
// @Accept json
// @Produce json
// @Param advisory_id path string true "Advisory ID"
// @Param limit query int false "Limit for paging, set -1 to return all"
// @Param limit query int false "Limit for paging"
// @Param offset query int false "Offset for paging"
// @Param sort query string false "Sort field" Enums(id,display_name,last_evaluation,last_upload,stale,status,template,groups,satellite_managed,built_pkgcache)
// @Param search query string false "Find matching text"
Expand Down Expand Up @@ -212,7 +212,7 @@ func systemsIDsStatus(c *gin.Context, systems []SystemsStatusID, meta *ListMeta)
// @Accept json
// @Produce json
// @Param advisory_id path string true "Advisory ID"
// @Param limit query int false "Limit for paging, set -1 to return all"
// @Param limit query int false "Limit for paging"
// @Param offset query int false "Offset for paging"
// @Param sort query string false "Sort field" Enums(id,display_name,last_evaluation,last_upload,rhsa_count,rhba_count,rhea_count,other_count,satellite_managed,stale,built_pkgcache)
// @Param search query string false "Find matching text"
Expand Down
4 changes: 2 additions & 2 deletions manager/controllers/baseline_systems.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func baselineSystemsCommon(c *gin.Context, account int, groups map[string]string
// @Accept json
// @Produce json
// @Param baseline_id path int true "Baseline ID"
// @Param limit query int false "Limit for paging, set -1 to return all"
// @Param limit query int false "Limit for paging"
// @Param offset query int false "Offset for paging"
// @Param sort query string false "Sort field" Enums(id,display_name,os,installable_rhsa_count,installable_rhba_count,installable_rhea_count,installable_other_count,applicable_rhsa_count,applicable_rhba_count,applicable_rhea_count,applicable_other_count,last_upload,groups)
// @Param search query string false "Find matching text"
Expand Down Expand Up @@ -172,7 +172,7 @@ func BaselineSystemsListHandler(c *gin.Context) {
// @Accept json
// @Produce json
// @Param baseline_id path int true "Baseline ID"
// @Param limit query int false "Limit for paging, set -1 to return all"
// @Param limit query int false "Limit for paging"
// @Param offset query int false "Offset for paging"
// @Param sort query string false "Sort field" Enums(id,display_name,os,installable_rhsa_count,installable_rhba_count,installable_rhea_count,installable_other_count,applicable_rhsa_count,applicable_rhba_count,applicable_rhea_count,applicable_other_count,last_upload)
// @Param search query string false "Find matching text"
Expand Down
2 changes: 1 addition & 1 deletion manager/controllers/baselines.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ type BaselinesResponse struct {
// @Security RhIdentity
// @Accept json
// @Produce json
// @Param limit query int false "Limit for paging, set -1 to return all"
// @Param limit query int false "Limit for paging"
// @Param offset query int false "Offset for paging"
// @Param sort query string false "Sort field" Enums(id,name,systems,published,last_edited,creator)
// @Param search query string false "Find matching text"
Expand Down
4 changes: 2 additions & 2 deletions manager/controllers/package_systems.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func packageSystemsCommon(db *gorm.DB, c *gin.Context) (*gorm.DB, *ListMeta, []s
// @Security RhIdentity
// @Accept json
// @Produce json
// @Param limit query int false "Limit for paging, set -1 to return all"
// @Param limit query int false "Limit for paging"
// @Param offset query int false "Offset for paging"
// @Param package_name path string true "Package name"
// @Param tags query []string false "Tag filter"
Expand Down Expand Up @@ -165,7 +165,7 @@ func PackageSystemsListHandler(c *gin.Context) {
// @Security RhIdentity
// @Accept json
// @Produce json
// @Param limit query int false "Limit for paging, set -1 to return all"
// @Param limit query int false "Limit for paging"
// @Param offset query int false "Offset for paging"
// @Param package_name path string true "Package name"
// @Param tags query []string false "Tag filter"
Expand Down
2 changes: 1 addition & 1 deletion manager/controllers/package_versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func packageVersionsQuery(db *gorm.DB, acc int, groups map[string]string, packag
// @Security RhIdentity
// @Accept json
// @Produce json
// @Param limit query int false "Limit for paging, set -1 to return all"
// @Param limit query int false "Limit for paging"
// @Param offset query int false "Offset for paging"
// @Param package_name path string true "Package name"
// @Success 200 {object} PackageVersionsResponse
Expand Down
2 changes: 1 addition & 1 deletion manager/controllers/packages.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func packagesQuery(db *gorm.DB, filters map[string]FilterData, acc int, groups m
// @Security RhIdentity
// @Accept json
// @Produce json
// @Param limit query int false "Limit for paging, set -1 to return all"
// @Param limit query int false "Limit for paging"
// @Param offset query int false "Offset for paging"
// @Param sort query string false "Sort field" Enums(id,name,systems_installed,systems_installable,systems_applicable)
// @Param search query string false "Find matching text"
Expand Down
4 changes: 2 additions & 2 deletions manager/controllers/system_advisories.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func systemAdvisoriesCommon(c *gin.Context) (*gorm.DB, *ListMeta, []string, erro
// @Accept json
// @Produce json
// @Param inventory_id path string true "Inventory ID"
// @Param limit query int false "Limit for paging, set -1 to return all"
// @Param limit query int false "Limit for paging"
// @Param offset query int false "Offset for paging"
// @Param sort query string false "Sort field" Enums(id,name,type,synopsis,public_date)
// @Param search query string false "Find matching text"
Expand Down Expand Up @@ -157,7 +157,7 @@ func SystemAdvisoriesHandler(c *gin.Context) {
// @Accept json
// @Produce json
// @Param inventory_id path string true "Inventory ID"
// @Param limit query int false "Limit for paging, set -1 to return all"
// @Param limit query int false "Limit for paging"
// @Param offset query int false "Offset for paging"
// @Param sort query string false "Sort field" Enums(id,name,type,synopsis,public_date)
// @Param search query string false "Find matching text"
Expand Down
2 changes: 1 addition & 1 deletion manager/controllers/system_packages.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func systemPackageQuery(db *gorm.DB, account int, groups map[string]string, inve
// @Accept json
// @Produce json
// @Param inventory_id path string true "Inventory ID"
// @Param limit query int false "Limit for paging, set -1 to return all"
// @Param limit query int false "Limit for paging"
// @Param offset query int false "Offset for paging"
// @Param search query string false "Find matching text"
// @Param filter[name] query string false "Filter"
Expand Down
4 changes: 2 additions & 2 deletions manager/controllers/systems.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ func systemsCommon(c *gin.Context) (*gorm.DB, *ListMeta, []string, error) {
// @Security RhIdentity
// @Accept json
// @Produce json
// @Param limit query int false "Limit for paging, set -1 to return all"
// @Param limit query int false "Limit for paging"
// @Param offset query int false "Offset for paging"
// @Param sort query string false "Sort field" Enums(id,display_name,last_upload,rhsa_count,rhba_count,rhea_count,other_count,stale,packages_installed,baseline_name,groups,satellite_managed,built_pkgcache)
// @Param search query string false "Find matching text"
Expand Down Expand Up @@ -280,7 +280,7 @@ func SystemsListHandler(c *gin.Context) {
// @Security RhIdentity
// @Accept json
// @Produce json
// @Param limit query int false "Limit for paging, set -1 to return all"
// @Param limit query int false "Limit for paging"
// @Param offset query int false "Offset for paging"
// @Param sort query string false "Sort field" Enums(id,display_name,last_upload,rhsa_count,rhba_count,rhea_count,other_count,stale,packages_installed,baseline_name,satellite_managed,built_pkgcache)
// @Param search query string false "Find matching text"
Expand Down
4 changes: 2 additions & 2 deletions manager/controllers/systems_advisories_view.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ func queryDB(c *gin.Context, endpoint string) ([]systemsAdvisoriesDBLoad, *ListM
// @Accept json
// @Produce json
// @Param body body SystemsAdvisoriesRequest true "Request body"
// @Param limit query int false "Limit for paging, set -1 to return all"
// @Param limit query int false "Limit for paging"
// @Param offset query int false "Offset for paging"
// @Param tags query []string false "Tag filter"
// @Param filter[group_name] query []string false "Filter systems by inventory groups"
Expand Down Expand Up @@ -260,7 +260,7 @@ func PostSystemsAdvisories(c *gin.Context) {
// @Accept json
// @Produce json
// @Param body body SystemsAdvisoriesRequest true "Request body"
// @Param limit query int false "Limit for paging, set -1 to return all"
// @Param limit query int false "Limit for paging"
// @Param offset query int false "Offset for paging"
// @Param tags query []string false "Tag filter"
// @Param filter[group_name] query []string false "Filter systems by inventory groups"
Expand Down
2 changes: 1 addition & 1 deletion manager/controllers/systemtags.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ var SystemTagsOpts = ListOpts{
// @Security RhIdentity
// @Produce json
// @Param sort query string false "Sort field" Enums(tag, count)
// @Param limit query int fals "Limit for paging, set -1 to return all"
// @Param limit query int fals "Limit for paging"
// @Param offset query int false "Offset for paging"
// @Success 200 {object} SystemTagsResponse
// @Failure 400 {object} utils.ErrorResponse
Expand Down
2 changes: 1 addition & 1 deletion manager/controllers/template_systems.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ func TemplateSystemsListHandler(c *gin.Context) {
// @Accept json
// @Produce json
// @Param template_id path string true "Template ID"
// @Param limit query int false "Limit for paging, set -1 to return all"
// @Param limit query int false "Limit for paging"
// @Param offset query int false "Offset for paging"
// @Param sort query string false "Sort field" Enums(id,display_name,os,installable_rhsa_count,installable_rhba_count,installable_rhea_count,installable_other_count,applicable_rhsa_count,applicable_rhba_count,applicable_rhea_count,applicable_other_count,last_upload)
// @Param search query string false "Find matching text"
Expand Down

0 comments on commit 2564dc4

Please sign in to comment.