Repository navigation
Document the 63-character domain limit for domain applications and SIP addresses - #991
Devon-White wants to merge 2 commits into
Conversation
…P addresses - identifier (domain application create/update): maxLength 50, the 63-character domain limit, and a 422 example for it - context_id (SIP address create/update): the domain the Domain's name produces, domain_too_long and domain_not_available - Error codes page: add domain_not_available and domain_too_long
|
Nice work, Devon. The core facts check out against the source code, and the generated diff matches the What I verified as correct: the 63-character domain limit, the 50-character Technical1. The identifier math is wrong in two-hyphen Spaces.
2. Allowed identifier characters aren't documented. The API accepts letters, digits, and hyphens only. The identifier must start and end with a letter or digit and can't contain two hyphens in a row. Anything else returns a 422. Please add 3. The cross-Space conflict for domain applications is missing. The SIP address docs cover 4. Scope the new error-code entries to SIP addresses.
Related and pre-existing: line 58 says Relay REST's " 5. Worth adding to the update Style6. "Domain" and "domain" share one sentence. 7. "the error below" in the 422 description. The added text is otherwise clean: no em dashes, banned terms, or internal details. |
- Domain applications: add the identifier character rule (@pattern plus prose), describe the separator generically, document the cross-Space "Identifier is not available" 422, and note that changing identifier rebuilds the domain and can change its separator. - List the identifier failures in DomainApplicationStatusCode422. - Fix the domain example (your-space-test-id). - SIP addresses: call the built hostname "the address's SIP domain". - Error codes page: scope domain_not_available and domain_too_long to the SIP address endpoints, and correct the Relay REST note: there, code repeats the HTTP status. - Regenerate openapi.yaml.
|
Addressed at 3ce5c05.
|
Summary
A domain application's domain, and the domain a Fabric SIP address gets from its Domain, must fit in 63 characters. The API rejects a longer domain with a
422, unless a domain application in the same Space already uses that domain. This PR documents that limit.POST /api/relay/rest/domain_applications,PUT /api/relay/rest/domain_applications/{id}):identifiernow hasmaxLength: 50and explains the 63-character domain limit (Space name, separator, identifier). On update, the check runs only whenidentifierchanges. Both operations now use aDomainApplicationStatusCode422response with theIdentifier makes the domain longer than 63 charactersexample, following thePhoneNumberSearchStatusCode422pattern.context_idexplains the domain the Domain's name produces (public/privatefor the built-in Domains), the 63-character limit, and thedomain_too_longanddomain_not_availablecodes.domain_not_availableanddomain_too_longin alphabetical order.fern/apis/signalwire-rest/openapi.yamlwithyarn build:specs.Verification
Checked against the API source:
makes the domain longer than 63 charactersonidentifier. The update contract inherits the create contract, and the domain is rebuilt only whenidentifierchanges.<subdomain>-<name>, or<subdomain>--<name>in Spaces using the double-hyphen separator. Built-in read-only Domains contributepublicorprivate. Other Domains contribute their name in lowercase.detailis the full message,statusandcodeare"422", andtitleisInvalid Attribute.domain_too_long("Domain is longer than 63 characters.") anddomain_not_available("Domain is not available.", returned when a domain application in another Space already uses the domain), both oncontext_id.yarn build:specs: passes.yarn fern-md-check: passes.Notes for reviewers
domain_too_longin the SIP address 422 error-code enums. This spec doesn't model acodeenum for those 422s (SipAddressCreateStatusCode422andSipAddressUpdateStatusCode422are a genericStatusCode422with one example), so there was no enum to extend. The codes are documented in thecontext_iddescription and on the error codes page instead./api/fabric/addresses/sipand the older alias/api/fabric/sip_addresses, with the same validation. This spec documents only/api/fabric/sip_addresses, and update only asPATCH, althoughPUTis also routed. I left that unchanged because it is out of scope.domain_not_availableon domain applications: this check also runs on domain applications. There, Relay REST returnsIdentifier is not availablewith code"422", not a named code, so the error codes page entry describes the SIP address case.domainexample,your-space-test_id, contains an underscore, whichidentifierdoesn't allow. Left as is.main.tspfiles. This PR doesn't touch those lines. Ifopenapi.yamlconflicts, rerunyarn build:specsinstead of merging the file by hand.Preview