diff options
author | Bryan Newbold <bnewbold@archive.org> | 2020-06-13 15:00:46 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@archive.org> | 2020-06-13 15:00:46 -0700 |
commit | 4575478d953fae3068959feef80517cafc826fea (patch) | |
tree | c0e888c56e88df69d8cc2811e8f51069e1e33fbe /rust/fatcat-openapi/README.md | |
parent | 94f72165f5b030c3189453249e05fab0dcf62d9b (diff) | |
download | fatcat-cli-4575478d953fae3068959feef80517cafc826fea.tar.gz fatcat-cli-4575478d953fae3068959feef80517cafc826fea.zip |
copy codegen rust openapi client from fatcat repo
Diffstat (limited to 'rust/fatcat-openapi/README.md')
-rw-r--r-- | rust/fatcat-openapi/README.md | 316 |
1 files changed, 316 insertions, 0 deletions
diff --git a/rust/fatcat-openapi/README.md b/rust/fatcat-openapi/README.md new file mode 100644 index 0000000..4740d49 --- /dev/null +++ b/rust/fatcat-openapi/README.md @@ -0,0 +1,316 @@ +# Rust API for fatcat-openapi + +Fatcat is a scalable, versioned, API-oriented catalog of bibliographic +entities and file metadata. + + +## Overview + +This client/server was generated by the [openapi-generator] +(https://openapi-generator.tech) project. By using the +[OpenAPI-Spec](https://github.com/OAI/OpenAPI-Specification) from a remote +server, you can easily generate a server stub. + +To see how to make this your own, look here: + +[README]((https://openapi-generator.tech)) + +- API version: 0.3.1 +- Build date: 2020-05-18T19:57:20.713017-07:00[America/Los_Angeles] + +For more information, please visit [https://fatcat.wiki](https://fatcat.wiki) + +This autogenerated project defines an API crate `fatcat-openapi` which contains: +* An `Api` trait defining the API in Rust. +* Data types representing the underlying data model. +* A `Client` type which implements `Api` and issues HTTP requests for each operation. +* A router which accepts HTTP requests and invokes the appropriate `Api` method for each operation. + +It also contains an example server and client which make use of `fatcat-openapi`: + +* The example server starts up a web server using the `fatcat-openapi` + router, and supplies a trivial implementation of `Api` which returns failure + for every operation. +* The example client provides a CLI which lets you invoke + any single operation on the `fatcat-openapi` client by passing appropriate + arguments on the command line. + +You can use the example server and client as a basis for your own code. +See below for [more detail on implementing a server](#writing-a-server). + +## Examples + +Run examples with: + +``` +cargo run --example <example-name> +``` + +To pass in arguments to the examples, put them after `--`, for example: + +``` +cargo run --example client -- --help +``` + +### Running the example server +To run the server, follow these simple steps: + +``` +cargo run --example server +``` + +### Running the example client +To run a client, follow one of the following simple steps: + +``` +cargo run --example client AcceptEditgroup +cargo run --example client AuthCheck +cargo run --example client CreateAuthToken +cargo run --example client DeleteContainer +cargo run --example client DeleteContainerEdit +cargo run --example client DeleteCreator +cargo run --example client DeleteCreatorEdit +cargo run --example client DeleteFile +cargo run --example client DeleteFileEdit +cargo run --example client DeleteFileset +cargo run --example client DeleteFilesetEdit +cargo run --example client DeleteRelease +cargo run --example client DeleteReleaseEdit +cargo run --example client DeleteWebcapture +cargo run --example client DeleteWebcaptureEdit +cargo run --example client DeleteWork +cargo run --example client DeleteWorkEdit +cargo run --example client GetChangelog +cargo run --example client GetChangelogEntry +cargo run --example client GetContainer +cargo run --example client GetContainerEdit +cargo run --example client GetContainerHistory +cargo run --example client GetContainerRedirects +cargo run --example client GetContainerRevision +cargo run --example client GetCreator +cargo run --example client GetCreatorEdit +cargo run --example client GetCreatorHistory +cargo run --example client GetCreatorRedirects +cargo run --example client GetCreatorReleases +cargo run --example client GetCreatorRevision +cargo run --example client GetEditgroup +cargo run --example client GetEditgroupAnnotations +cargo run --example client GetEditgroupsReviewable +cargo run --example client GetEditor +cargo run --example client GetEditorAnnotations +cargo run --example client GetEditorEditgroups +cargo run --example client GetFile +cargo run --example client GetFileEdit +cargo run --example client GetFileHistory +cargo run --example client GetFileRedirects +cargo run --example client GetFileRevision +cargo run --example client GetFileset +cargo run --example client GetFilesetEdit +cargo run --example client GetFilesetHistory +cargo run --example client GetFilesetRedirects +cargo run --example client GetFilesetRevision +cargo run --example client GetRelease +cargo run --example client GetReleaseEdit +cargo run --example client GetReleaseFiles +cargo run --example client GetReleaseFilesets +cargo run --example client GetReleaseHistory +cargo run --example client GetReleaseRedirects +cargo run --example client GetReleaseRevision +cargo run --example client GetReleaseWebcaptures +cargo run --example client GetWebcapture +cargo run --example client GetWebcaptureEdit +cargo run --example client GetWebcaptureHistory +cargo run --example client GetWebcaptureRedirects +cargo run --example client GetWebcaptureRevision +cargo run --example client GetWork +cargo run --example client GetWorkEdit +cargo run --example client GetWorkHistory +cargo run --example client GetWorkRedirects +cargo run --example client GetWorkReleases +cargo run --example client GetWorkRevision +cargo run --example client LookupContainer +cargo run --example client LookupCreator +cargo run --example client LookupFile +cargo run --example client LookupRelease +``` + +### HTTPS +The examples can be run in HTTPS mode by passing in the flag `--https`, for example: + +``` +cargo run --example server -- --https +``` + +This will use the keys/certificates from the examples directory. Note that the +server chain is signed with `CN=localhost`. + +## Using the generated library + +The generated library has a few optional features that can be activated through Cargo. + +* `server` + * This defaults to enabled and creates the basic skeleton of a server implementation based on hyper + * To create the server stack you'll need to provide an implementation of the API trait to provide the server function. +* `client` + * This defaults to enabled and creates the basic skeleton of a client implementation based on hyper + * The constructed client implements the API trait by making remote API call. +* `conversions` + * This defaults to disabled and creates extra derives on models to allow "transmogrification" between objects of structurally similar types. + +See https://doc.rust-lang.org/cargo/reference/manifest.html#the-features-section for how to use features in your `Cargo.toml`. + +## Documentation for API Endpoints + +All URIs are relative to *https://api.fatcat.wiki/v0* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**accept_editgroup**](docs/default_api.md#accept_editgroup) | **POST** /editgroup/{editgroup_id}/accept | +[**auth_check**](docs/default_api.md#auth_check) | **GET** /auth/check | +[**auth_oidc**](docs/default_api.md#auth_oidc) | **POST** /auth/oidc | +[**create_auth_token**](docs/default_api.md#create_auth_token) | **POST** /auth/token/{editor_id} | +[**create_container**](docs/default_api.md#create_container) | **POST** /editgroup/{editgroup_id}/container | +[**create_container_auto_batch**](docs/default_api.md#create_container_auto_batch) | **POST** /editgroup/auto/container/batch | +[**create_creator**](docs/default_api.md#create_creator) | **POST** /editgroup/{editgroup_id}/creator | +[**create_creator_auto_batch**](docs/default_api.md#create_creator_auto_batch) | **POST** /editgroup/auto/creator/batch | +[**create_editgroup**](docs/default_api.md#create_editgroup) | **POST** /editgroup | +[**create_editgroup_annotation**](docs/default_api.md#create_editgroup_annotation) | **POST** /editgroup/{editgroup_id}/annotation | +[**create_file**](docs/default_api.md#create_file) | **POST** /editgroup/{editgroup_id}/file | +[**create_file_auto_batch**](docs/default_api.md#create_file_auto_batch) | **POST** /editgroup/auto/file/batch | +[**create_fileset**](docs/default_api.md#create_fileset) | **POST** /editgroup/{editgroup_id}/fileset | +[**create_fileset_auto_batch**](docs/default_api.md#create_fileset_auto_batch) | **POST** /editgroup/auto/fileset/batch | +[**create_release**](docs/default_api.md#create_release) | **POST** /editgroup/{editgroup_id}/release | +[**create_release_auto_batch**](docs/default_api.md#create_release_auto_batch) | **POST** /editgroup/auto/release/batch | +[**create_webcapture**](docs/default_api.md#create_webcapture) | **POST** /editgroup/{editgroup_id}/webcapture | +[**create_webcapture_auto_batch**](docs/default_api.md#create_webcapture_auto_batch) | **POST** /editgroup/auto/webcapture/batch | +[**create_work**](docs/default_api.md#create_work) | **POST** /editgroup/{editgroup_id}/work | +[**create_work_auto_batch**](docs/default_api.md#create_work_auto_batch) | **POST** /editgroup/auto/work/batch | +[**delete_container**](docs/default_api.md#delete_container) | **DELETE** /editgroup/{editgroup_id}/container/{ident} | +[**delete_container_edit**](docs/default_api.md#delete_container_edit) | **DELETE** /editgroup/{editgroup_id}/container/edit/{edit_id} | +[**delete_creator**](docs/default_api.md#delete_creator) | **DELETE** /editgroup/{editgroup_id}/creator/{ident} | +[**delete_creator_edit**](docs/default_api.md#delete_creator_edit) | **DELETE** /editgroup/{editgroup_id}/creator/edit/{edit_id} | +[**delete_file**](docs/default_api.md#delete_file) | **DELETE** /editgroup/{editgroup_id}/file/{ident} | +[**delete_file_edit**](docs/default_api.md#delete_file_edit) | **DELETE** /editgroup/{editgroup_id}/file/edit/{edit_id} | +[**delete_fileset**](docs/default_api.md#delete_fileset) | **DELETE** /editgroup/{editgroup_id}/fileset/{ident} | +[**delete_fileset_edit**](docs/default_api.md#delete_fileset_edit) | **DELETE** /editgroup/{editgroup_id}/fileset/edit/{edit_id} | +[**delete_release**](docs/default_api.md#delete_release) | **DELETE** /editgroup/{editgroup_id}/release/{ident} | +[**delete_release_edit**](docs/default_api.md#delete_release_edit) | **DELETE** /editgroup/{editgroup_id}/release/edit/{edit_id} | +[**delete_webcapture**](docs/default_api.md#delete_webcapture) | **DELETE** /editgroup/{editgroup_id}/webcapture/{ident} | +[**delete_webcapture_edit**](docs/default_api.md#delete_webcapture_edit) | **DELETE** /editgroup/{editgroup_id}/webcapture/edit/{edit_id} | +[**delete_work**](docs/default_api.md#delete_work) | **DELETE** /editgroup/{editgroup_id}/work/{ident} | +[**delete_work_edit**](docs/default_api.md#delete_work_edit) | **DELETE** /editgroup/{editgroup_id}/work/edit/{edit_id} | +[**get_changelog**](docs/default_api.md#get_changelog) | **GET** /changelog | +[**get_changelog_entry**](docs/default_api.md#get_changelog_entry) | **GET** /changelog/{index} | +[**get_container**](docs/default_api.md#get_container) | **GET** /container/{ident} | +[**get_container_edit**](docs/default_api.md#get_container_edit) | **GET** /container/edit/{edit_id} | +[**get_container_history**](docs/default_api.md#get_container_history) | **GET** /container/{ident}/history | +[**get_container_redirects**](docs/default_api.md#get_container_redirects) | **GET** /container/{ident}/redirects | +[**get_container_revision**](docs/default_api.md#get_container_revision) | **GET** /container/rev/{rev_id} | +[**get_creator**](docs/default_api.md#get_creator) | **GET** /creator/{ident} | +[**get_creator_edit**](docs/default_api.md#get_creator_edit) | **GET** /creator/edit/{edit_id} | +[**get_creator_history**](docs/default_api.md#get_creator_history) | **GET** /creator/{ident}/history | +[**get_creator_redirects**](docs/default_api.md#get_creator_redirects) | **GET** /creator/{ident}/redirects | +[**get_creator_releases**](docs/default_api.md#get_creator_releases) | **GET** /creator/{ident}/releases | +[**get_creator_revision**](docs/default_api.md#get_creator_revision) | **GET** /creator/rev/{rev_id} | +[**get_editgroup**](docs/default_api.md#get_editgroup) | **GET** /editgroup/{editgroup_id} | +[**get_editgroup_annotations**](docs/default_api.md#get_editgroup_annotations) | **GET** /editgroup/{editgroup_id}/annotations | +[**get_editgroups_reviewable**](docs/default_api.md#get_editgroups_reviewable) | **GET** /editgroup/reviewable | +[**get_editor**](docs/default_api.md#get_editor) | **GET** /editor/{editor_id} | +[**get_editor_annotations**](docs/default_api.md#get_editor_annotations) | **GET** /editor/{editor_id}/annotations | +[**get_editor_editgroups**](docs/default_api.md#get_editor_editgroups) | **GET** /editor/{editor_id}/editgroups | +[**get_file**](docs/default_api.md#get_file) | **GET** /file/{ident} | +[**get_file_edit**](docs/default_api.md#get_file_edit) | **GET** /file/edit/{edit_id} | +[**get_file_history**](docs/default_api.md#get_file_history) | **GET** /file/{ident}/history | +[**get_file_redirects**](docs/default_api.md#get_file_redirects) | **GET** /file/{ident}/redirects | +[**get_file_revision**](docs/default_api.md#get_file_revision) | **GET** /file/rev/{rev_id} | +[**get_fileset**](docs/default_api.md#get_fileset) | **GET** /fileset/{ident} | +[**get_fileset_edit**](docs/default_api.md#get_fileset_edit) | **GET** /fileset/edit/{edit_id} | +[**get_fileset_history**](docs/default_api.md#get_fileset_history) | **GET** /fileset/{ident}/history | +[**get_fileset_redirects**](docs/default_api.md#get_fileset_redirects) | **GET** /fileset/{ident}/redirects | +[**get_fileset_revision**](docs/default_api.md#get_fileset_revision) | **GET** /fileset/rev/{rev_id} | +[**get_release**](docs/default_api.md#get_release) | **GET** /release/{ident} | +[**get_release_edit**](docs/default_api.md#get_release_edit) | **GET** /release/edit/{edit_id} | +[**get_release_files**](docs/default_api.md#get_release_files) | **GET** /release/{ident}/files | +[**get_release_filesets**](docs/default_api.md#get_release_filesets) | **GET** /release/{ident}/filesets | +[**get_release_history**](docs/default_api.md#get_release_history) | **GET** /release/{ident}/history | +[**get_release_redirects**](docs/default_api.md#get_release_redirects) | **GET** /release/{ident}/redirects | +[**get_release_revision**](docs/default_api.md#get_release_revision) | **GET** /release/rev/{rev_id} | +[**get_release_webcaptures**](docs/default_api.md#get_release_webcaptures) | **GET** /release/{ident}/webcaptures | +[**get_webcapture**](docs/default_api.md#get_webcapture) | **GET** /webcapture/{ident} | +[**get_webcapture_edit**](docs/default_api.md#get_webcapture_edit) | **GET** /webcapture/edit/{edit_id} | +[**get_webcapture_history**](docs/default_api.md#get_webcapture_history) | **GET** /webcapture/{ident}/history | +[**get_webcapture_redirects**](docs/default_api.md#get_webcapture_redirects) | **GET** /webcapture/{ident}/redirects | +[**get_webcapture_revision**](docs/default_api.md#get_webcapture_revision) | **GET** /webcapture/rev/{rev_id} | +[**get_work**](docs/default_api.md#get_work) | **GET** /work/{ident} | +[**get_work_edit**](docs/default_api.md#get_work_edit) | **GET** /work/edit/{edit_id} | +[**get_work_history**](docs/default_api.md#get_work_history) | **GET** /work/{ident}/history | +[**get_work_redirects**](docs/default_api.md#get_work_redirects) | **GET** /work/{ident}/redirects | +[**get_work_releases**](docs/default_api.md#get_work_releases) | **GET** /work/{ident}/releases | +[**get_work_revision**](docs/default_api.md#get_work_revision) | **GET** /work/rev/{rev_id} | +[**lookup_container**](docs/default_api.md#lookup_container) | **GET** /container/lookup | +[**lookup_creator**](docs/default_api.md#lookup_creator) | **GET** /creator/lookup | +[**lookup_file**](docs/default_api.md#lookup_file) | **GET** /file/lookup | +[**lookup_release**](docs/default_api.md#lookup_release) | **GET** /release/lookup | +[**update_container**](docs/default_api.md#update_container) | **PUT** /editgroup/{editgroup_id}/container/{ident} | +[**update_creator**](docs/default_api.md#update_creator) | **PUT** /editgroup/{editgroup_id}/creator/{ident} | +[**update_editgroup**](docs/default_api.md#update_editgroup) | **PUT** /editgroup/{editgroup_id} | +[**update_editor**](docs/default_api.md#update_editor) | **PUT** /editor/{editor_id} | +[**update_file**](docs/default_api.md#update_file) | **PUT** /editgroup/{editgroup_id}/file/{ident} | +[**update_fileset**](docs/default_api.md#update_fileset) | **PUT** /editgroup/{editgroup_id}/fileset/{ident} | +[**update_release**](docs/default_api.md#update_release) | **PUT** /editgroup/{editgroup_id}/release/{ident} | +[**update_webcapture**](docs/default_api.md#update_webcapture) | **PUT** /editgroup/{editgroup_id}/webcapture/{ident} | +[**update_work**](docs/default_api.md#update_work) | **PUT** /editgroup/{editgroup_id}/work/{ident} | + + +## Documentation For Models + + - [AuthOidc](docs/AuthOidc.md) + - [AuthOidcResult](docs/AuthOidcResult.md) + - [AuthTokenResult](docs/AuthTokenResult.md) + - [ChangelogEntry](docs/ChangelogEntry.md) + - [ContainerAutoBatch](docs/ContainerAutoBatch.md) + - [ContainerEntity](docs/ContainerEntity.md) + - [CreatorAutoBatch](docs/CreatorAutoBatch.md) + - [CreatorEntity](docs/CreatorEntity.md) + - [Editgroup](docs/Editgroup.md) + - [EditgroupAnnotation](docs/EditgroupAnnotation.md) + - [EditgroupEdits](docs/EditgroupEdits.md) + - [Editor](docs/Editor.md) + - [EntityEdit](docs/EntityEdit.md) + - [EntityHistoryEntry](docs/EntityHistoryEntry.md) + - [ErrorResponse](docs/ErrorResponse.md) + - [FileAutoBatch](docs/FileAutoBatch.md) + - [FileEntity](docs/FileEntity.md) + - [FileUrl](docs/FileUrl.md) + - [FilesetAutoBatch](docs/FilesetAutoBatch.md) + - [FilesetEntity](docs/FilesetEntity.md) + - [FilesetFile](docs/FilesetFile.md) + - [FilesetUrl](docs/FilesetUrl.md) + - [ReleaseAbstract](docs/ReleaseAbstract.md) + - [ReleaseAutoBatch](docs/ReleaseAutoBatch.md) + - [ReleaseContrib](docs/ReleaseContrib.md) + - [ReleaseEntity](docs/ReleaseEntity.md) + - [ReleaseExtIds](docs/ReleaseExtIds.md) + - [ReleaseRef](docs/ReleaseRef.md) + - [Success](docs/Success.md) + - [WebcaptureAutoBatch](docs/WebcaptureAutoBatch.md) + - [WebcaptureCdxLine](docs/WebcaptureCdxLine.md) + - [WebcaptureEntity](docs/WebcaptureEntity.md) + - [WebcaptureUrl](docs/WebcaptureUrl.md) + - [WorkAutoBatch](docs/WorkAutoBatch.md) + - [WorkEntity](docs/WorkEntity.md) + + +## Documentation For Authorization + +## Bearer +- **Type**: HTTP basic authentication + +Example +``` +``` + +## Author + +webservices@archive.org + |