mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-04-25 19:43:47 +03:00
Note 'coreapi dump' command
This commit is contained in:
parent
28820449f0
commit
aa40c58381
|
@ -161,15 +161,17 @@ credentials --help` or `coreapi headers --help`.
|
||||||
## Codecs
|
## Codecs
|
||||||
|
|
||||||
By default the command line client only includes support for reading Core JSON
|
By default the command line client only includes support for reading Core JSON
|
||||||
schemas, however it for installing additional codecs.
|
schemas, however it includes a plugin system for installing additional codecs.
|
||||||
|
|
||||||
$ pip install openapi-codec jsonhyperschema-codec hal-codec
|
$ pip install openapi-codec jsonhyperschema-codec hal-codec
|
||||||
$ coreapi codecs show
|
$ coreapi codecs show
|
||||||
Codecs
|
Codecs
|
||||||
corejson "application/vnd.coreapi+json"
|
corejson application/vnd.coreapi+json encoding, decoding
|
||||||
openapi "application/openapi+json"
|
hal application/hal+json encoding, decoding
|
||||||
jsonhyperschema "application/schema+json"
|
openapi application/openapi+json encoding, decoding
|
||||||
hal "application/hal+json"
|
jsonhyperschema application/schema+json decoding
|
||||||
|
json application/json data
|
||||||
|
text text/* data
|
||||||
|
|
||||||
## Utilities
|
## Utilities
|
||||||
|
|
||||||
|
@ -202,6 +204,10 @@ To load a schema file from disk:
|
||||||
|
|
||||||
$ coreapi load my-api-schema.json --format corejson
|
$ coreapi load my-api-schema.json --format corejson
|
||||||
|
|
||||||
|
To dump the current document to console in a given format:
|
||||||
|
|
||||||
|
$ coreapi dump --format openapi
|
||||||
|
|
||||||
To remove the current document, along with all currently saved history,
|
To remove the current document, along with all currently saved history,
|
||||||
credentials, headers and bookmarks:
|
credentials, headers and bookmarks:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user