riboseinc / ribose-api

API for Ribose
0 stars 0 forks source link

Check blueprints well-formedness in CI #33

Closed skalee closed 6 years ago

skalee commented 6 years ago

Run Drafter in Travis CI environment to prove that API blueprints are well-formed. See https://github.com/riboseinc/ribose-api/issues/1#issuecomment-341796160 and subsequent comments for rationale and details.

skalee commented 6 years ago

Reopening, because I got one more question to @ribose-jeffreylau. How and when the apiary.apib is built? Should I run make in Travis before validating?

ronaldtse commented 6 years ago

@skalee the final file apiary.apib should be built whenever there is an update to the inner apib files. Perhaps we can add a Travis check to ensure that the make update is run, i.e., the git repo's apiary.apib is identical to the newly-generated one?

skalee commented 6 years ago

Thanks for clarification. Though personally, I think it's bit odd to keep the compilation result in source repository.

skalee commented 6 years ago

Fixed in #42.

ronaldtse commented 6 years ago

@skalee I agree that it's a weird process. The issue is that Apiary can only read a single file, and that single apib file is pulled from a git repo. Perhaps we can keep it this way for now...

skalee commented 6 years ago

I wonder… Since we got a makefile anyway, perhaps we should trigger validations in the makefile's default build step? I mean sth like:

default: validate

validate: apiary.abip
    # run validations

apiary.abip: input.apib $(DEPS)
    # build
ronaldtse commented 6 years ago

Sounds like a great idea @skalee !👍