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

Review Native API Documentation #2174

Closed
posixeleni opened this issue May 15, 2015 · 8 comments
Closed

Review Native API Documentation #2174

posixeleni opened this issue May 15, 2015 · 8 comments

Comments

@posixeleni
Copy link
Contributor

From @pdurbin #1489 (comment)

Putting "all native APIs" on a single page at http://guides.dataverse.org/en/latest/api/native-api.html feels wrong since there are so many endpoints there.

Are we saying that creating a dataset with JSON is an advanced operation?

@bencomp
Copy link
Contributor

bencomp commented Aug 21, 2015

Suggestion for Native API documentation: data samples for every endpoint that include a note saying which parameters are required, optional and ignored. I currently have to go into the code to find what fields are required or ignored.

(Edited to clarify "level of requiredness")

@pdurbin pdurbin removed their assignment Jan 21, 2016
@scolapasta scolapasta removed this from the Not Assigned to a Release milestone Jan 28, 2016
@pdurbin
Copy link
Member

pdurbin commented Apr 1, 2016

@bmckinney is playing with Swagger (i.e. @ApiOperation) here, for example: https://github.com/bmckinney/bio-dataverse/blob/8a7403b5cfccb02c913168f89825fbd5615af326/src/main/java/edu/harvard/iq/dataverse/batch/launcher/ImportLauncher.java#L57

He gave me a demo yesterday and it looks really nice.

@pdurbin
Copy link
Member

pdurbin commented Feb 2, 2017

I was telling @pameyer today that at the very least, the native API docs should have descriptions of the various endpoints at the top of the page like SWORD does:

screen shot 2017-02-01 at 8 00 17 pm

Without these headings, it quite hard to find stuff.

In addition, the native API docs should be split into multiple pages. That's why I put the Search API on it's own page. It's overwhelming to have so much on one page, especially if we provide more JSON examples, which we should.

@pdurbin
Copy link
Member

pdurbin commented Feb 8, 2017

Related: #3624

@pameyer
Copy link
Contributor

pameyer commented May 1, 2017

Error message can sometimes be clearer:

@RightInTwo
Copy link
Contributor

RightInTwo commented Mar 21, 2019

Are there any developments in regards to a Swagger/OpenAPI definition (or similar) for the Native API?

@pdurbin
Copy link
Member

pdurbin commented Mar 21, 2019

@RightInTwo nope. As I said above on April 1st, 2016, one of us played with adding Java annotations (@ApiOperation) to automatically generate Swagger output (this was not an April Fool's joke), but nothing has been done since then.

We are definitely open to pull requests!

The main thing I want for this issue is not necessarily Swagger but to split the long "native" API into multiple pages, one for "Dataverses", one for "Datasets", one for "Admin", etc. We should also have a "greatest hits" or FAQ of common operations such as:

  • how to create a dataset
  • how to upload a file

As of http://guides.dataverse.org/en/4.11/api/native-api.html here's how many operations are on that one page:

Native_API_—Dataverse org-_2019-03-21_12 02 38

@pdurbin
Copy link
Member

pdurbin commented Aug 21, 2019

Are there any developments in regards to a Swagger/OpenAPI definition (or similar) for the Native API?

@RightInTwo these days there's an issue to track: Use OpenAPI standard for Dataverse API's (Swagger) #5794

And there is a development in the sense that we learned that if we upgrade from Glassfish 4 to Payara 5, we can get Swagger/OpenAPI compatible output automatically. Please see #5794 (comment) and #5155 (comment)

I mentioned this in pull request #6107, which I made yesterday. Since that pull request was about making the API Guide better, I'm going to go ahead and close this issue.

Anyone reading this is welcome to open new issues about how to improve the API Guide. Also, pull request #6107 hasn't been merged yet and feedback is welcome!

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

No branches or pull requests

6 participants