Conversation
One record per data set in config/sources.yaml, DCAT-AP field names. SourceCatalog validates lazily and fails loudly on incomplete records.
…tom-attribute Source config as custom attribute
Added test data setup
…butes Add housing for custom attributes
# Conflicts: # CHANGELOG.md # src/Source/Osm/HandicapParking.php
The test sources were written against the SourceInterface and Definition as they were before the source refactoring, so they no longer matched: * Pass the Wgs84Transformer to createNgsiEntity instead of injecting it into the constructor, as the real sources now do. * Forward the new dataType through TestDefinition, and declare it on each test source so the right importer unwraps the feed. * Read the url and query of an accessUrl through Definition rather than destructuring the array in every caller, so a source declaring a query can be fetched as well as read. Refreshed the OpenStreetMap test fixture while we were at it.
The access URL was a string|array union: a plain URL, or a map of url and query for the one source that needs a long Overpass QL script. Two reader methods hid the union from callers, but the raw property stayed public and two of its users never learned to disambiguate it. So the OSM source published its whole Overpass script as the NGSI source property of every entity, and as access_url in the catalogue, where a URL belongs. The mapping test asserted the property against the definition it came from, so it compared the array with itself and passed. Splitting the query into its own field settles it: the access URL is a string again and cannot be anything else, accessUrlBase() and accessUrlQuery() are gone, and their two callers read the properties. Sources that send no query say nothing, as before.
This reverts commit 14b4dad. The string|array access URL is the shape feature/source-stuff settled on, so reshaping it belongs with that work rather than here. This branch stays what its name says: the test setup aligned with the importer approach. accessUrlBase() and accessUrlQuery() stay. They are part of that alignment — they moved the destructuring out of SourceReader::getData so the fetch command can reach a source's url and query too.
Refactored sources and releated services
Cleaned up
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The initial mess …