You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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 /properties with 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
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 @param for all parameters, @returns description, and usage example
Add @see links 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.ts and the Systems methods from Issue Phase 2.1: Systems Methods #5
Task
Implement all 6 Properties methods in
url_builder.tsand add Properties method tests tourl_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
src/ogc-api/csapi/url_builder.tssrc/ogc-api/csapi/url_builder.spec.tsBlueprint 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 usingbuildQueryString(), 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, sortingSingle 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}/historyProperties 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 supportbbox,datetime, or any Part 2 temporal parameters (see Guide §6 temporal applicability matrix).JSDoc Requirements
@paramfor all parameters,@returnsdescription, and usage example@seelinks to OGC CSAPI Part 1 specification sections for Properties endpointssrc/ogc-api/edr/url_builder.tsand the Systems methods from Issue Phase 2.1: Systems Methods #5Testing Requirements
src/ogc-api/csapi/url_builder.spec.ts(~25–30 lines)getPropertiescollection query andgetPropertyindividual retrievalgetPropertySystems,getPropertyDataStreams,getPropertyControlStreams)propertiesis not inavailableResourcesthrows an errorsrc/ogc-api/edr/url_builder.spec.tsScope — What NOT to Touch
model.ts— type definitions belong to Issue Phase 1.1: Create Type System (csapi/model.ts) #1helpers.ts— helper utilities belong to Issue Phase 1.2: Create Helper Utilities (csapi/helpers.ts) #2buildResourceUrl(),buildQueryString(),extractAvailableResources(), oravailableResources— those belong to Issue Phase 1.3: Create Stub QueryBuilder (csapi/url_builder.ts) #3endpoint.ts,info.ts, orsrc/index.ts— integration belongs to Issue Phase 1.4: Integrate with OgcApiEndpoint #4Acceptance Criteria
url_builder.tscontains all 6 Properties methods listed abovebuildResourceUrl()andbuildQueryString()helpers@param,@returns,@seeurl_builder.spec.tscontains Properties tests covering property retrieval, system/datastream/controlstream associations, and resource validation (~25–30 lines)npm test)Dependencies
Blocked by: Issue #1 (Type System — provides
PropertyQueryOptionsand 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
Key constraints for this task:
References
Read these documents before starting implementation. They are ordered by priority.
Primary References (must read)
docs/planning/csapi-implementation-guide.mddocs/planning/csapi-implementation-guide.mddocs/planning/csapi-implementation-guide.mdsrc/ogc-api/edr/url_builder.tssrc/ogc-api/edr/url_builder.spec.tsdocs/planning/ROADMAP.mdUpstream Type/Import References (files this task imports from)
src/ogc-api/csapi/model.tsPropertyQueryOptions,CSAPIResourceType(created by Issue #1)src/ogc-api/csapi/helpers.tsencodeArray(created by Issue #2)Research References (context, not required reading)
docs/research/requirements/csapi-part1-requirements.mddocs/research/requirements/csapi-query-parameters.mdSpecification References (for
@seelinks and field accuracy)sosa:ObservableProperty,sosa:ActuatableProperty)Convention Quick Reference
.jsextension for relative importsimport { X } from './file.js'import typefor interfaces/typesimport type { Y } from './model.js'export interface Z { ... }as constarrays for enum-like valuesexport const XTypes = [...] as constglobalThis.fetch = jest.fn()