Repository navigation
Description
Task
Implement all 6 Properties methods in url_builder.ts and add Properties method tests to url_builder.spec.ts. Properties is the fifth Phase 2 resource type and follows the pattern established by Systems (Issue #5). Properties is unique among Part 1 resources: it is read-only (no create/update/delete) and is the only Part 1 resource that is not a GeoJSON Feature.
ROADMAP Reference: Phase 2, Task 5 — Properties Methods (~1–1.5 hours implementation + ~0.5 hour testing, Medium complexity)
Files to Create or Modify
| File | Action | Est. Lines | Purpose |
|---|---|---|---|
src/ogc-api/csapi/url_builder.ts |
Modify | ~35–50 added | Add 6 Properties methods with resource validation |
src/ogc-api/csapi/url_builder.spec.ts |
Modify | ~25–30 added | Add Properties method tests |
Blueprint Reference
Follow the Systems methods pattern established in Issue #5 (same file). Also reference the EDR pattern in src/ogc-api/edr/url_builder.ts (562 lines) for resource validation, URL construction, and query parameter appending.
Scope — What to Implement
6 Properties Methods
Each method validates resource availability (~2 lines), builds a URL using buildResourceUrl(), appends query parameters using buildQueryString(), and returns the constructed URL string. Properties is read-only — no create/update/delete methods.
Collection query:
getProperties(options?: PropertyQueryOptions): string—GET /propertieswith pagination, filtering, sorting
Single resource:
getProperty(id: string, options?): string—GET /properties/{id}
Association links:
getPropertySystems(id: string, options?): string—GET /properties/{id}/systems(systems capable of observing this property)getPropertyDataStreams(id: string, options?): string—GET /properties/{id}/datastreams(Part 2 cross-reference)getPropertyControlStreams(id: string, options?): string—GET /properties/{id}/controlstreams(Part 2 cross-reference)
History:
getPropertyHistory(id: string, options?): string—GET /properties/{id}/history
Properties Query Parameters
Properties support: system, baseProperty, id, uid, q, property filters, limit, offset, f, sortBy, sortOrder.
All parameters are serialised by the shared buildQueryString() helper (Issue #3). Note: Properties do not support bbox, datetime, or any Part 2 temporal parameters (see Guide §6 temporal applicability matrix).
JSDoc Requirements
- Document each method with
@paramfor all parameters,@returnsdescription, and usage example - Add
@seelinks to OGC CSAPI Part 1 specification sections for Properties endpoints - Note in JSDoc that Properties is the only Part 1 resource that is not a GeoJSON Feature
- Follow the JSDoc style in
src/ogc-api/edr/url_builder.tsand the Systems methods from Issue Phase 2.1: Systems Methods #5
Testing Requirements
- Extend
src/ogc-api/csapi/url_builder.spec.ts(~25–30 lines) - Test
getPropertiescollection query andgetPropertyindividual retrieval - Test system, datastream, and control stream association methods (
getPropertySystems,getPropertyDataStreams,getPropertyControlStreams) - Test resource validation — calling any Properties method when
propertiesis not inavailableResourcesthrows an error - Follow test patterns from Systems tests (Issue Phase 2.1: Systems Methods #5) and
src/ogc-api/edr/url_builder.spec.ts
Scope — What NOT to Touch
- ❌ Do NOT implement Systems, Deployments, Procedures, Sampling Features, DataStreams, Observations, Control Streams, or Commands methods — those belong to Issues Phase 2.1: Systems Methods #5–Phase 2.4: Sampling Features Methods #8 and Phase 2.6: DataStreams Methods #10–Phase 2.9: Commands Methods #13
- ❌ Do NOT modify
model.ts— type definitions belong to Issue Phase 1.1: Create Type System (csapi/model.ts) #1 - ❌ Do NOT modify
helpers.ts— helper utilities belong to Issue Phase 1.2: Create Helper Utilities (csapi/helpers.ts) #2 - ❌ Do NOT modify the constructor,
buildResourceUrl(),buildQueryString(),extractAvailableResources(), oravailableResources— those belong to Issue Phase 1.3: Create Stub QueryBuilder (csapi/url_builder.ts) #3 - ❌ Do NOT modify
endpoint.ts,info.ts, orsrc/index.ts— integration belongs to Issue Phase 1.4: Integrate with OgcApiEndpoint #4 - ❌ Do NOT modify Systems, Deployments, Procedures, or Sampling Features methods — those belong to Issues Phase 2.1: Systems Methods #5–Phase 2.4: Sampling Features Methods #8
- ❌ Do NOT modify files outside the "Files to Create or Modify" table above
- ❌ Do NOT refactor existing code unless required to complete this task
Acceptance Criteria
-
url_builder.tscontains all 6 Properties methods listed above - Each method validates resource availability before constructing a URL
- Each method uses
buildResourceUrl()andbuildQueryString()helpers - All new methods have complete JSDoc documentation with
@param,@returns,@see -
url_builder.spec.tscontains Properties tests covering property retrieval, system/datastream/controlstream associations, and resource validation (~25–30 lines) - Existing tests still pass (
npm test) - No lint errors
Dependencies
Blocked by: Issue #1 (Type System — provides PropertyQueryOptions and resource types), Issue #2 (Helper Utilities — provides encoding helpers), Issue #3 (Stub QueryBuilder — provides constructor, buildResourceUrl, buildQueryString, availableResources), Issue #5 (Systems Methods — establishes the pattern)
Blocks: Issues #10–#13 (subsequent resource type methods)
Operational Constraints
⚠️ MANDATORY: Before starting work on this issue, reviewdocs/governance/AI_OPERATIONAL_CONSTRAINTS.md.
Key constraints for this task:
- Precedence: OGC specifications → AI Collaboration Agreement → This issue description → Existing code → Conversational context
- No scope expansion: Do not infer unstated requirements or add unrequested features
- No refactoring: Do not rename, restructure, or "improve" code outside this issue's scope
- Minimal diffs: Prefer the smallest change that satisfies the acceptance criteria
- Ask when unclear: If intent is ambiguous, stop and ask for clarification
References
Read these documents before starting implementation. They are ordered by priority.
Primary References (must read)
| # | Document | Section/Lines | What It Provides |
|---|---|---|---|
| 1 | docs/planning/csapi-implementation-guide.md |
§6 Properties Resource Methods (lines 1545–1590) | Read-only operations, query parameters, relationship management, non-Feature resource note |
| 2 | docs/planning/csapi-implementation-guide.md |
§6 Complete Query Parameter Support (lines 1921–2000) | All query parameters with types, applicability, encoding rules |
| 3 | docs/planning/csapi-implementation-guide.md |
§6 Query Parameters and Code Reuse (lines 720–900) | Parameter distribution analysis, temporal applicability matrix showing Properties has no temporal/spatial params |
| 4 | src/ogc-api/edr/url_builder.ts |
Full file (562 lines) | Blueprint: method structure, resource validation, URL construction pattern |
| 5 | src/ogc-api/edr/url_builder.spec.ts |
Full file | Blueprint: test patterns for URL builder methods |
| 6 | docs/planning/ROADMAP.md |
Phase 2, Task 5 (lines 222–234) | Authoritative task definition, method list, test requirements |
Upstream Type/Import References (files this task imports from)
| # | Document | What to Import |
|---|---|---|
| 7 | src/ogc-api/csapi/model.ts |
PropertyQueryOptions, CSAPIResourceType (created by Issue #1) |
| 8 | src/ogc-api/csapi/helpers.ts |
Encoding helpers: encodeArray (created by Issue #2) |
Research References (context, not required reading)
| # | Document | What It Provides |
|---|---|---|
| 9 | docs/research/requirements/csapi-part1-requirements.md |
Detailed client implementation requirements for Properties navigation |
| 10 | docs/research/requirements/csapi-query-parameters.md |
Complete catalog of all CSAPI query parameters |
Specification References (for @see links and field accuracy)
| # | Document | Use |
|---|---|---|
| 11 | OGC API - Connected Systems Part 1 (23-001) | Properties resource definitions, read endpoints, query parameters |
| 12 | OGC API - Connected Systems Part 1: OpenAPI Spec | Properties endpoint definitions — normative URL paths |
| 13 | SOSA/SSN Ontology | Semantic definitions for observable and actuatable properties (sosa:ObservableProperty, sosa:ActuatableProperty) |
| 14 | OGC API - Connected Systems Part 2 (23-002) | Context for property–datastream and property–controlstream associations |
Convention Quick Reference
| Rule | Example |
|---|---|
Use .js extension for relative imports |
import { X } from './file.js' |
Use import type for interfaces/types |
import type { Y } from './model.js' |
| Three-tier hierarchy: import from lower tiers only | shared → ogc-api → csapi |
| Named exports for types and utilities | export interface Z { ... } |
as const arrays for enum-like values |
export const XTypes = [...] as const |
HTTP mocking: globalThis.fetch = jest.fn() |
Never use nock, msw, or other libraries |
| Meaningful tests only | Verify behavior, not that code runs without throwing |
Activity
Sam-Bolling commentedon Feb 14, 2026
This document contains actionable guardrails derived from real mistakes made in Phase 1–2.2. All 7 lessons apply to this issue. Key callouts for Properties:
bbox, NOdatetime, NOparent/recursive, NOfoi. It does supportsystem,baseProperty.buildQueryString.this.assertResourceAvailable('properties')— grep to verify after implementation.url_builder.ts+url_builder.spec.tsonly. No new files.docs: add Phase 2.5 code review — Properties + findings fix
docs: add findings report for Issue #9 — Accept header default for Pa…
docs: add findings report for Issue #13 — type guard functions for ex…
docs: add Phase 5 parser completion implementation guide
feat(csapi): add parseControlStream() with 7 test cases (P5 Task 4)\n…
research(phase-9): add maintainer-engagement signals from cs-go upstr…
research(phase-9): add Courses of Action section with recommendation
research(phase-9): rewrite Courses of Action in plain English