Skip to content

APIMGMT-1989: Add method-specific rate limiting configuration to Subroute. #71

Merged
victor-mancera-sp merged 1 commit into
mainfrom
vmancera/APIMGMT-1989
Jun 1, 2026
Merged

APIMGMT-1989: Add method-specific rate limiting configuration to Subroute. #71
victor-mancera-sp merged 1 commit into
mainfrom
vmancera/APIMGMT-1989

Conversation

@victor-mancera-sp

Copy link
Copy Markdown
Contributor

Manual test:

node --input-type=module -e '
import { SubrouteKeys } from "./functions/types.js";
import { CheckInterfaceForField } from "./functions/utils.js";

const subroutes = {
  "/subroute": {
    rateLimit: 5,
    rateLimitIntervalSeconds: 10,
    methodConfig: [
      { methods: ["GET"], rateLimit: 10, rateLimitIntervalSeconds: 10 },
      { methods: ["POST"], rateLimit: 3, rateLimitIntervalSeconds: 10 }
    ]
  }
};

let errors = [];
for (const [id, sub] of Object.entries(subroutes)) {
  CheckInterfaceForField(id, sub, SubrouteKeys, errors);
}
console.log("SubrouteKeys:", SubrouteKeys);
console.log("Errors:", errors);
'

Out: 

SubrouteKeys: [
  'rights',
  'methods',
  'versions',
  'rateLimit',
  'rateLimitIntervalSeconds',
  'methodConfig'
]
Errors: []

@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown

Linting Report

Last updated: 6/1/2026, 2:52:00 PM

Found 18 total issues:

  • ❌ Error: 18

OpenAPI Specs

❌ Invalid Ref (8)
  • File: /packages/test-files/sailpoint-api.OpenAPI.yaml (7)

    • Line 86: #/ é, à, ö,/schemas/Pet does not exist
    • Line 100: #/components/schemas/ é, à, ö, does not exist
    • Line 138: #/components/ é, à, ö,/Pet does not exist
    • Line 314: #/components/ é, à, ö,/ApiResponse does not exist
    • Line 349: #/Test/schemas/Order does not exist
    • Line 352: #/components/Test/Order does not exist
    • Line 355: #/components/schemas/Test does not exist
  • File: /packages/test-files/v2024/paths/account.yaml (1)

    • Line 32: ENOENT: no such file or directory, open /home/runner/work/api-linter/api-linter/packages/test-files/v2024/responses/InvalidReference.yaml
❌ Paths Must Not Reference Documents Outside Of Their Version (2)
❌ Root Tags Must Be In Alphabetical Order (1)

Gateway

❌ Gateway Route Back Off Config Enabled Must Be Boolean (1)
  • File: /packages/test-files/sp-gateway-routes.yaml (1)

    • Line 66: Invalid value for backOffConfig.enabled. Must be a boolean.
❌ Gateway Route Back Off Config Integer Fields Must Be Positive (2)
  • File: /packages/test-files/sp-gateway-routes.yaml (2)

    • Line 67: Invalid value for backOffConfig integer field. Must be a positive integer.
    • Line 69: Invalid value for backOffConfig integer field. Must be a positive integer.
❌ Gateway Route Back Off Config Must Have Valid Properties (1)
  • File: /packages/test-files/sp-gateway-routes.yaml (1)

    • Line 65: backOffConfig has an invalid field: unknownField
❌ Gateway Route Back Off Config Tiers Must Be Valid (1)
  • File: /packages/test-files/sp-gateway-routes.yaml (1)

    • Line 68: Invalid value for backOffConfig.tiers. Must be an array of positive integers.
❌ Gateway Route Must Have Version Start In Order (1)
  • File: /packages/test-files/sp-gateway-routes.yaml (1)

    • Line 61: versioned apis must be specified above non-versioned apis
❌ Gateway Route Version Details Map Keys Must Not Exceed Version End (1)
  • File: /packages/test-files/sp-gateway-routes.yaml (1)

    • Line 37: versionDetailsMap key "v2028" (API version 2028) cannot be greater than versionEnd (2026); that entry is ignored by sp-gateway.

@victor-mancera-sp victor-mancera-sp merged commit 29c84bd into main Jun 1, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants