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

Define a procedure to declare/generate ApiDocumentation #11

Closed
Mec-iS opened this issue Jun 3, 2017 · 4 comments
Closed

Define a procedure to declare/generate ApiDocumentation #11

Mec-iS opened this issue Jun 3, 2017 · 4 comments
Assignees

Comments

@Mec-iS
Copy link
Contributor

Mec-iS commented Jun 3, 2017

Now that we have basic models and some kind of structuring of data, we need to define the ApiDocument endpoint.

@Mec-iS
Copy link
Contributor Author

Mec-iS commented Jun 3, 2017

Operations are the basic ones as stated in #3: CRUDs implemented through HTTP methods.

As in Hydra spec:

...
  "supportedOperation": [
    {
      "@type": "Operation",     # Hydra:Operation
      "title": "Creates a new comment",    # description
      "method": "POST",    # HTTP method
      "expects": "http://api.example.com/doc/#Comment",    # class of objects expected as input, defined in the ApiDoc itself 
      "returns": "http://api.example.com/doc/#Comment",   # class of objects returned
      "possibleStatus": [
        ... Statuses that should be expected and handled properly ...
      ]
    }

For example, in our case expects would have as value Subsystem_Spacecraft, so this class has to be in the ApiDocumentation, so we need a script to "port" the RDF-OWL declaration into the Hydra document declaration.

@chrizandr chrizandr mentioned this issue Jun 7, 2017
@Mec-iS
Copy link
Contributor Author

Mec-iS commented Jun 11, 2017

@xadahiya @chrizandr
NOTE: for now we are in the right direction but the ApiDoc is still too much hard-coded. Try to generate/modify it at server runtime, wecan follow to prossible strategies and use different fallbacks:

  • parse the RDF vocabulary (if provided) and try to extract the ApiDoc from the metadata;
  • read the structure of the data as it is dumped and try to extract the ApiDoc from the instance data.
    As much you can do about this at the moment is fine, it cannot really be a perfect/general mechanism at the moment. As a way to go, focus on the instance data to grasp a list of classes of resources (HydraClass) and eventual relationships between these classes from the dumped data, and the then apply CRUD operations to what it's found.

chrizandr pushed a commit to chrizandr/hydrus that referenced this issue Jun 22, 2017
@chrizandr
Copy link
Member

Doc writer #38

@Mec-iS
Copy link
Contributor Author

Mec-iS commented Jul 28, 2017

ok. we need now to tell the end-user where he/she can write its own ApiDoc before running the app (same as WALK-THROUGH #54)

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

3 participants