- Issue created by @balintbrews
- First commit to issue fork.
- π¬π§United Kingdom justafish London, UK
balintbrews β credited justafish β .
- π³π±Netherlands balintbrews Amsterdam, NL
I was thinking about backwards compatibility with the
0.x
branch, and I was ready to go ahead and start different versions for the CLI to address that, but @justafish had a better idea:We could see if in our
upload
command we receive a 422 error complaining about thedataDependencies
property not being recognized β which would happen with the0.x
branch. In that case, we could retry the request while removingdataDependencies
from the payload. - π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
Is there any way we can write a test for this? We have the hello-world template component - can we add a test that it validates against the open api file?
https://www.npmjs.com/package/openapi-request-validator looks like what we want
That would prevent changes in Drupal breaking this in the future.
- πΊπΈUnited States bnjmnm Ann Arbor, MI
Re #7 discussed this with some folks including @balintbrews / @effulgentsia / @hooroomoo and it was determined that the scenario that needs to be tested here is better implemented as an integration test, as the unit would require a degree of mocking that would limit the test's ability to catch actual problems. Currently, integration tests aren't set up at all and would significantly expand the scope of this issue. The discussion concluded that we should prioritize getting the fix in to address some of the immediate needs of other projects, and focus on integration test implementation in a separate (and likely much larger) issue.
- π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
A simple PHPUnit test that validated hello-world/component.yml against the
#/components/schemas/NewCodeComponent
spec in the open API file would have caught this regression. Any objections to me adding that to this branch?