The DFC Prototype does include the context while the output of the DFC
Connector refers to the URL of the published context. While that's more
efficient, it's also brittle because the context is updated from time to
time. That happened three days ago and working with the newly published
context breaks our integration until we get an updated version of the
DFC Connector containing the new URLs for datatypes.
This allows us to run the specs separately to generate the
documentation. It's more efficient this way and the separate swagger doc
file is easier to read.
The engine-specific swagger helper also allows us to simplify the spec
files.
Added an exception to our styleguide because it's intended and useful to
have a complete (lengthy) description of the API in one block.
In other API specs, you provide example values in the schema. So the
specs contain examples which can be used for the documentation. But
instead of defining example data separately, we can use the generated
data by the specs. This way we document real output and don't have to
double up on documentation.
Note that we don't have schema definitions for the DFC API yet. And it
wouldn't make sense to replicate the DFC Ontology manually in JSON
Schema for this purpose. The DFC Connector ensures already that we
comply with the ontology. But I hope that we can use a tool at some
point to generate JSON Schema from the DFC Ontology which would add more
detail to the Swagger docs, I think.
I chose the simplest spec first to demonstrate how it works. The UI at
/api-docs now shows this endpoint with two possible responses.
The docs are missing an example response which I hope to add later.
OFN products and variants need more data like a price but the DFC
stores that in a different object. We may get a larger graph containing
that information but we don't have any test data yet.
This request came from the current DFC prototype. The changes are
probably implementing DFC v1.7.
I observed by including `$request_body` in the nginx log on the staging
server.
This is work in progress. The DFC Connector uses a more recent DFC
version and other endpoints still use the old serializers. We need to
update those endpoints as well and update the version number in the API
URL.
Services are usually not namespaced because they are part of the app.
This engine has an isolated namespace which means that we don't need to
separate with out own namespacing here.