Skip to content

Commit

Permalink
Improve readability of some prolix paragraphs
Browse files Browse the repository at this point in the history
  • Loading branch information
hayco committed Apr 7, 2021
1 parent dd33836 commit a6c8a11
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@
File contents can be directly uploaded to a document, referenced by its `externalId`. This yields a (possibly new)
version of a `typeName` typed file for that document.

If the document with `externalId` does not yet exist, you can have the repository create it during import by passing
If the document with `externalId` does not exist yet, you can have the repository create it by passing
`allowNewDocument=true`.

Otherwise, using `allowNewDocument=false`, the import will verify that you are uploading to an already existing
Otherwise, using `allowNewDocument=false`, the import task will verify that you are uploading to an already existing
document, or deny the request. Note that this is also the default if you leave `allowNewDocument` out.

If you offer the same contents of a version already registered for this document during another import, by
default (`asLatestVersion=false`), no new version will be created as it already exists for that particular document and
type. This _idempotent_ behavior ensures that if, e.g., versions `1-2-3-4` have been imported so far, and you offer the
contents of `2` in subsequent import requests with `asLatestVersion=false`, there will be no changes to the versions.
If you upload the same contents of a version already registered for a particular document and type, no new version will
be created by default (`asLatestVersion=false`). This _idempotent_ behavior ensures that if, e.g., versions `1-2-3-4`
have been imported, and you offer the contents of `2` with `asLatestVersion=false`, there will be no changes to the
version trail.

However, if you _do_ want to have an **earlier** version, that was superseded by another import, to become the
**latest** version again, you can pass `asLatestVersion=true` with your import request. In the above example of
versions `1-2-3-4` being in the repository, if you were to import the contents of `2` again with `asLatestVersion=true`,
the versions in the repository will look like `1-2-3-4-2` designating version `2` as the latest version again.
**latest** version again, you can pass `asLatestVersion=true`. In the above example of versions `1-2-3-4` being in the
repository, if you were to import the contents of `2` with `asLatestVersion=true`, the version trail will be
`1-2-3-4-2` designating `2` as the latest version.

## Importing contents for a document that does not exist (yet)

Expand Down

0 comments on commit a6c8a11

Please sign in to comment.