Skip to content

Enforce APIC maxLength constraints in server-schema.json and fix violations#142

Merged
lindazqli merged 1 commit intomainfrom
fix/enforce-apic-property-maxlength-constraints
Mar 11, 2026
Merged

Enforce APIC maxLength constraints in server-schema.json and fix violations#142
lindazqli merged 1 commit intomainfrom
fix/enforce-apic-property-maxlength-constraints

Conversation

@rkolesnikovDX
Copy link
Collaborator

Problem

The server-schema.json is missing several maxLength constraints that Azure API Center enforces server-side. When server JSON files contain fields that exceed these undocumented limits, the APIC REST API returns 4xx errors during sync. Due to the fail-fast batch processing in the sync pipeline, a single server's field violation blocks ALL subsequent servers from being created/updated.

Impact observed

grounding-with-bing-custom-search.json has externalDocumentation.title = 52 characters (APIC limit: 50). Since servers are processed alphabetically in batches, this failure cascades and blocks:

Changes

Schema changes (partners/server-schema.json)

Added missing maxLength constraints to match APIC enforcement:

Property Added Constraint APIC Limit
externalDocumentation.title maxLength: 50 50
externalDocumentation.url maxLength: 200, format: uri 200
license.name maxLength: 50 50
license.url maxLength: 200, format: uri 200
repository.url maxLength: 200, format: uri 200
repository.source maxLength: 100 100

Server data fixes

File Field Before After
grounding-with-bing-custom-search.json externalDocumentation.title 52 chars (over limit) 37 chars
azure-mcp-server.json useCases[0].description 1001 chars (over existing 1000 limit) 988 chars

Validation

All 67 server JSON files pass validation against the updated schema.

…ations

Add missing maxLength constraints to server-schema.json to match Azure API
Center limits that are enforced server-side. Without these schema-level
constraints, servers with fields exceeding APIC limits pass local validation
but fail during sync — and due to fail-fast batch processing, a single
failure blocks all subsequent servers from being created.

Schema changes (partners/server-schema.json):
- externalDocumentation.title: add maxLength 50
- externalDocumentation.url: add maxLength 200, format uri
- license.name: add maxLength 50
- license.url: add maxLength 200, format uri
- repository.url: add maxLength 200, format uri
- repository.source: add maxLength 100

Server data fixes:
- grounding-with-bing-custom-search.json: shorten externalDocumentation.title
  from 52 to 37 chars (was exceeding 50-char APIC limit, causing cascading
  failure that blocked grounding-with-bing-search, sharepoint-grounding,
  web-search, and all later servers)
- azure-mcp-server.json: trim useCases[0].description from 1001 to 988 chars
  (exceeding existing 1000-char maxLength constraint)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@lindazqli lindazqli merged commit 10370de into main Mar 11, 2026
2 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.

2 participants