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
…te enum in openapi.yaml.
Used phply to parse the layouts_presets.php file and extract the stores
array from there. Then, I fetched openapi.yaml, extracted the template
enum, and compared the two lists. The code logs an error and returns 255 if
there are any differences between them.
Added a validate command to makefile. To test it out, just run "make validate".
I still need to create travis.yml and add make validate to it. I would also
advise to add the lint/isort/black checks since there's python code in this
repo now.
Ref: #34
The Story
As a Victor,
I never want to see wrong theme name bug again,
because it is completely preventable.
Problem
Theme names are hardcoded in CartFront theme and not checked against the valid values defined in openapi.yaml schema.
Proposal
Before you start: It's
Bookstore
, notBooks Store
orBook Store
. Use search & replace to fix all codebase.Option A:
$stores
array into an enummake codegen
command that generates the$stores
enum fromtemplate
values on https://app.woocart.com/api/v1/openapi.yaml.make codegen
changes filesOption B:
make validate
command that validates values of$stores
array againsttemplate
values on https://app.woocart.com/api/v1/openapi.yamlmake validate
on Travis so the build fails if values do not matchPitfalls
Best practices (DoD)
e.g. help articles or technical docs.
Expectations (AC)
Books Store
was refactored toBookstore
.theme
values in CartFront do not matchtemplate
values in openapi.yaml spec.The text was updated successfully, but these errors were encountered: