Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why not use OpenAPI? #24

Open
DanielHabenicht opened this issue Apr 23, 2021 · 13 comments
Open

Why not use OpenAPI? #24

DanielHabenicht opened this issue Apr 23, 2021 · 13 comments

Comments

@DanielHabenicht
Copy link

Do I miss something or are there only types defined inside the core library?

Using OpenAPI or just JSONSchema would allow the following benefits:

@Savallator
Copy link
Contributor

The Interfaces and API is defined here.

@domenukk
Copy link
Member

Having the spec as markdown in an implementation repository is not really an ideal solution.
I agree that using OpenAPI could be really cool and useful.

@DanielHabenicht
Copy link
Author

DanielHabenicht commented Apr 23, 2021

Ok, will put a PR against EnoEngine then, with a first draftspec.

@DanielHabenicht
Copy link
Author

I would add an OpenAPI Spec for EnoChecker, but for the Engine it would be better to generate it from you project via swashbuckle, I can add it too if you want.

@domenukk
Copy link
Member

If it's generated from the code, it's no longer an actual independent specification, right? It would make the code the specification, instead (which would be fine by me, too, just pointing it out)

@DanielHabenicht
Copy link
Author

DanielHabenicht commented Apr 23, 2021

yes, but as the engine is your single source of truth either way it makes sense?

@DanielHabenicht
Copy link
Author

For the dashboard there is no API, right? EnoEngine is just sharing the file via a shared docker volume?

@Trolldemorted
Copy link
Member

EnoEngine is not running within docker, so it just puts the scoreboard files into ../data, which is /services/data/ in the bambictf setup.

These files are sent to the EnoLandingPage's bind-mounted input folder with rsync in a while true loop. A bit hacky, but it works :)

@DanielHabenicht
Copy link
Author

DanielHabenicht commented Apr 23, 2021

Might be good to add an architectural overview :D

@Trolldemorted
Copy link
Member

I agree, do you have an idea how one can nicely visualize the information flow within distributed systems?

The mini-picture on the slides was created o draw.io, but everything I create there looks hideous.

@DanielHabenicht
Copy link
Author

@DanielHabenicht
Copy link
Author

DanielHabenicht commented Apr 27, 2021

So before going ahead I would appreciate your feedback:

  1. Do you want to specify the openapi spec for the checker first (and then build any checker implementation from there) or do you want to build a reference checker and generate the spec from it (e.g. using the EnoChecker)?
  2. For the python checker we could than use connexion (Flask based as the current one) to implement a Spec Validated checker.

BTW: Is there a reason why async and sync enochecker are not sharing a codebase?

@DanielHabenicht
Copy link
Author

DanielHabenicht commented Jun 4, 2021

Here a first preview:
https://danielhabenicht.stoplight.io/docs/enochecker/

Any preferences for a documentation generator? I would go for https://mrin9.github.io/RapiDoc/examples/themes.html#post-/pet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants