Skip to content

Mwever/improvement/inline swagger docs#1038

Merged
joaquinvanschoren merged 16 commits intodevelopfrom
mwever/improvement/inline-swagger-docs
Aug 18, 2020
Merged

Mwever/improvement/inline swagger docs#1038
joaquinvanschoren merged 16 commits intodevelopfrom
mwever/improvement/inline-swagger-docs

Conversation

@mwever
Copy link
Collaborator

@mwever mwever commented Feb 7, 2020

Task: Annotate the backend API with swagger-php annotations so that we can generate a swagger.yaml/swagger.json from the inline documentation.

Current State: Added current documentation contained in the swagger.json/swagger.yaml from the downloads folder as inline documentation annotations to the API. Also added respective annotations for schemas.

  • Ensure that schemas can remain in API main file.
  • Manually test the automatic generation of swagger.json/swagger.yaml for the OpenAPI documented backend API.
  • Split up methods catering multiple REST URLs to have distinct handlers per REST URL.

…rovement/inline-swagger-docs

# Conflicts:
#	openml_OS/models/api/v1/Api_evaluation.php
…sible for handling the logic.

Refactored bootstrapping for tag/untag of several entities as well as attach/detach to clearly distinct between different handlers.
Fixed boolean types in annotations.
… openapi specifications from inline php annotations.
@mwever
Copy link
Collaborator Author

mwever commented Jul 9, 2020

Just checked in some scripts (bash and bat) for generating the OpenAPI specification from the PHP code annotations. It should all work by now. Just having some last tests with a clean clone of the branch (testing installation via composer and generation of the json/yaml files via the scripts.

Copy link
Member

@janvanrijn janvanrijn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the PR looks fine. Only thing that could be improved is removing the "flow_tag_untag" (run, data, setup, ..) functions, as these does not add anything immediately (and flow_tag and flow_untag) could call upon entity_tag_untag immediately.

@joaquinvanschoren
Copy link
Contributor

@mwever shall we leave the tag_untag functions out? I agree with Jan that would be nicer. What do you think?

Copy link
Contributor

@joaquinvanschoren joaquinvanschoren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but could you also make a README on how to produce the specification from this? And how other people should document new calls in the future? Or is there separate documentation about that elsewhere?

mwever added 2 commits August 18, 2020 17:21
…in the classes two string constants are defined keeping the values for the super class providing the entity type and the entity special name.
… documentation with annotations within the PHP REST API.
@mwever
Copy link
Collaborator Author

mwever commented Aug 18, 2020

tag_untag functions are now left out. I captured the duplicated values now with class constants.

I also added now some documentation in terms of a readme file (in the openapi directory). Please check whether the documentation is sufficient and understandable, as I am too deep into that in order to estimate how understandable my explanations are.

@joaquinvanschoren joaquinvanschoren merged commit bc01741 into develop Aug 18, 2020
@joaquinvanschoren
Copy link
Contributor

great, thanks!

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

Successfully merging this pull request may close these issues.

3 participants