Parent Issue
Split from #100 — assertResourceAvailable() is overly strict for per-ID methods — blocks valid URL construction for nested resources.
This is Part 1 of 2. See also: Part 2 (remaining resource types — issue to follow).
Scope — Part 1 Only
Remove this.assertResourceAvailable(...) from per-ID methods for the first 4 resource types. These are the Part 1 resources that typically ARE advertised as top-level links, but per-ID methods should still not guard on collection-level discovery.
Resource Types in This Part
| Resource Type |
Per-ID Methods |
List/Create Methods (KEEP assert) |
| Systems |
14 |
2 |
| Deployments |
7 |
2 |
| Procedures |
6 |
2 |
| SamplingFeatures |
6 |
2 |
| Total |
33 |
8 |
File to Modify
| File |
Action |
src/ogc-api/csapi/url_builder.ts |
Remove this.assertResourceAvailable(...) line from 33 per-ID methods |
Pattern
Each per-ID method changes from:
getSystem(id: string, options?: QueryOptions): string {
this.assertResourceAvailable('systems'); // ← Remove this line
return this.buildResourceUrl('systems', id, undefined, options);
}
to:
getSystem(id: string, options?: QueryOptions): string {
return this.buildResourceUrl('systems', id, undefined, options);
}
Which Methods to Change (33 deletions)
Systems (14): All methods matching get/update/deleteSystem* that take an id parameter. Examples: getSystem(), updateSystem(), deleteSystem(), getSystemDataStreams(), getSystemControlStreams(), getSystemDeployments(), getSystemSamplingFeatures(), getSystemProcedure(), getSystemHistory(), etc.
Deployments (7): All methods matching get/update/deleteDeployment* that take an id parameter. Examples: getDeployment(), updateDeployment(), deleteDeployment(), getDeploymentSubdeployments(), getDeploymentSystems(), etc.
Procedures (6): All methods matching get/update/deleteProcedure* that take an id parameter. Examples: getProcedure(), updateProcedure(), deleteProcedure(), getProcedureSystems(), getProcedureDataStreams(), etc.
SamplingFeatures (6): All methods matching get/update/deleteSamplingFeature* that take an id parameter. Examples: getSamplingFeature(), updateSamplingFeature(), deleteSamplingFeature(), getSamplingFeatureSystems(), etc.
Which Methods to KEEP Unchanged
All list/create methods (no id parameter) retain their assertResourceAvailable() guard:
getSystems(), createSystem(), getDeployments(), createDeployment(), getProcedures(), createProcedure(), getSamplingFeatures(), createSamplingFeature()
The guard is appropriate for these because listing a collection requires that the server actually advertises a top-level endpoint for it.
What NOT to Touch
- ❌ Properties, Datastreams, Observations, ControlStreams, Commands — those are Part 2
- ❌ List/create methods (no
id parameter) — keep their guards
- ❌
assertResourceAvailable() definition itself — leave it intact for list/create use
- ❌
buildResourceUrl() — no changes needed, it already handles fallback paths
- ❌ Any file outside
url_builder.ts
- ❌ Test files — existing tests should pass unchanged (the guard removal makes previously-throwing paths succeed)
Acceptance Criteria (Part 1)
Dependencies
Blocked by: Nothing
Blocks: Part 2, #145 (build() wrapper), #102 (nested parent IDs)
References
Operational Constraints
⚠️ MANDATORY: Before starting work on this issue, review docs/governance/AI_OPERATIONAL_CONSTRAINTS.md.
Upstream Isolation Constraint
Per the upstream maintainer's comment on PR #136: url_builder.ts is within src/ogc-api/csapi/ — purely internal to the isolated CSAPI module.
Parent Issue
Split from #100 —
assertResourceAvailable()is overly strict for per-ID methods — blocks valid URL construction for nested resources.This is Part 1 of 2. See also: Part 2 (remaining resource types — issue to follow).
Scope — Part 1 Only
Remove
this.assertResourceAvailable(...)from per-ID methods for the first 4 resource types. These are the Part 1 resources that typically ARE advertised as top-level links, but per-ID methods should still not guard on collection-level discovery.Resource Types in This Part
File to Modify
src/ogc-api/csapi/url_builder.tsthis.assertResourceAvailable(...)line from 33 per-ID methodsPattern
Each per-ID method changes from:
to:
Which Methods to Change (33 deletions)
Systems (14): All methods matching
get/update/deleteSystem*that take anidparameter. Examples:getSystem(),updateSystem(),deleteSystem(),getSystemDataStreams(),getSystemControlStreams(),getSystemDeployments(),getSystemSamplingFeatures(),getSystemProcedure(),getSystemHistory(), etc.Deployments (7): All methods matching
get/update/deleteDeployment*that take anidparameter. Examples:getDeployment(),updateDeployment(),deleteDeployment(),getDeploymentSubdeployments(),getDeploymentSystems(), etc.Procedures (6): All methods matching
get/update/deleteProcedure*that take anidparameter. Examples:getProcedure(),updateProcedure(),deleteProcedure(),getProcedureSystems(),getProcedureDataStreams(), etc.SamplingFeatures (6): All methods matching
get/update/deleteSamplingFeature*that take anidparameter. Examples:getSamplingFeature(),updateSamplingFeature(),deleteSamplingFeature(),getSamplingFeatureSystems(), etc.Which Methods to KEEP Unchanged
All list/create methods (no
idparameter) retain theirassertResourceAvailable()guard:getSystems(),createSystem(),getDeployments(),createDeployment(),getProcedures(),createProcedure(),getSamplingFeatures(),createSamplingFeature()The guard is appropriate for these because listing a collection requires that the server actually advertises a top-level endpoint for it.
What NOT to Touch
idparameter) — keep their guardsassertResourceAvailable()definition itself — leave it intact for list/create usebuildResourceUrl()— no changes needed, it already handles fallback pathsurl_builder.tsAcceptance Criteria (Part 1)
this.assertResourceAvailable(...)calls removed from per-ID methods for Systems, Deployments, Procedures, SamplingFeaturesassertResourceAvailable()guardstsc --noEmit— zero errorsnpm test— all tests passnpm run lint— zero errorsDependencies
Blocked by: Nothing
Blocks: Part 2, #145 (build() wrapper), #102 (nested parent IDs)
References
CSAPIQueryBuilder.assertResourceAvailable():url_builder.ts~L320–327buildResourceUrl()fallback behavior:url_builder.ts~L256–273Operational Constraints
Upstream Isolation Constraint
Per the upstream maintainer's comment on PR #136:
url_builder.tsis withinsrc/ogc-api/csapi/— purely internal to the isolated CSAPI module.