Skip to content

Commit

Permalink
Remove unused method argument and references to it in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jacksonj04 committed Nov 9, 2023
1 parent 2a17599 commit fee732c
Show file tree
Hide file tree
Showing 2 changed files with 111 additions and 112 deletions.
214 changes: 111 additions & 103 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,52 +3,56 @@ info:
title: Case Law Privileged API
version: 0.1.2
servers:
- url: "https://{environment}.caselaw.nationalarchives.gov.uk/v1"
variables:
environment:
default: api
enum:
- api
- api.staging
- url: "https://{environment}.caselaw.nationalarchives.gov.uk/v1"
variables:
environment:
default: api
enum:
- api
- api.staging
tags:
- description: Verify the operational state of the API
name: Status
- description: Operations for reading document content and metadata
name: Reading
- description: Operations for writing document content and metadata
name: Writing
- description: Verify the operational state of the API
name: Status
- description: Operations for reading document content and metadata
name: Reading
- description: Operations for writing document content and metadata
name: Writing
paths:
/status:
get:
description: "A test endpoint that can be used by clients to verify service\
description:
"A test endpoint that can be used by clients to verify service\
\ availability, and to verify valid authentication credentials.\nAuthentication\
\ is not required, but if it is provided, it will be checked for validity.\n"
responses:
"200":
description: "The service is available, and if authentication was provided,\
description:
"The service is available, and if authentication was provided,\
\ the authentication is valid."
"401":
description: "The service is available, but the provided authentication\
description:
"The service is available, but the provided authentication\
\ was not valid."
security:
- {}
- basic: []
- {}
- basic: []
summary: Health check
tags:
- Status
- Status
/{judgmentUri}:
get:
description: "Unless the client has `read_unpublished_documents` permission,\
description:
"Unless the client has `read_unpublished_documents` permission,\
\ then only published documents are accessible."
operationId: getDocumentByUri
parameters:
- explode: false
in: path
name: judgmentUri
required: true
schema:
type: string
style: simple
- explode: false
in: path
name: judgmentUri
required: true
schema:
type: string
style: simple
responses:
"200":
description: "A single judgment document, in Akoma Ntoso XML"
Expand All @@ -61,40 +65,42 @@ paths:
type: string
style: simple
X-Lock-State:
description: Included if the client has the `write_documents` role;
description:
Included if the client has the `write_documents` role;
specifies if the document is currently locked for editing.
example: true
explode: false
schema:
type: boolean
style: simple
security:
- basic:
- read_documents
- read_unpublished_documents
- basic:
- read_documents
- read_unpublished_documents
summary: "Read a judgment or decision, given its URI"
tags:
- Reading
- Reading
put:
description: "Write a complete new version of the document to the database,\
description:
"Write a complete new version of the document to the database,\
\ and release any client lock."
parameters:
- explode: false
in: path
name: judgmentUri
required: true
schema:
type: string
style: simple
- description: The last known version number of the document
example: "1"
explode: false
in: header
name: If-Match
required: true
schema:
type: string
style: simple
- explode: false
in: path
name: judgmentUri
required: true
schema:
type: string
style: simple
- description: The last known version number of the document
example: "1"
explode: false
in: header
name: If-Match
required: true
schema:
type: string
style: simple
responses:
"204":
description: The document was updated successfully and any client lock released
Expand All @@ -107,54 +113,52 @@ paths:
style: simple
"400":
description: "The request was malformed, and the document was not modified"
"412":
description: "The document was not updated, as it has changed since the\
\ version number specified If-Match. To avoid this, the client should\
\ lock the document before making any changes to it."
security:
- basic:
- write_documents
- basic:
- write_documents
summary: Update a judgment
tags:
- Writing
- Writing
/{judgmentUri}/lock:
get:
parameters:
- explode: false
in: path
name: judgmentUri
required: true
schema:
type: string
style: simple
- explode: false
in: path
name: judgmentUri
required: true
schema:
type: string
style: simple
responses:
"204":
description: Lock state included in header
headers:
X-Lock-State:
description: Included if the client has edit permissions; specifies
description:
Included if the client has edit permissions; specifies
if the document is currently locked for editing.
explode: false
schema:
type: boolean
style: simple
security:
- basic:
- write_documents
- basic:
- write_documents
summary: Query lock status for a document
tags:
- Writing
- Writing
put:
description: "Locks edit access for a document for the current client. Returns\
description:
"Locks edit access for a document for the current client. Returns\
\ the latest version of the locked document, alohg with the new lock state."
parameters:
- explode: false
in: path
name: judgmentUri
required: true
schema:
type: string
style: simple
- explode: false
in: path
name: judgmentUri
required: true
schema:
type: string
style: simple
responses:
"201":
description: "A single judgment document, in Akoma Ntoso XML"
Expand All @@ -167,7 +171,8 @@ paths:
type: string
style: simple
X-Lock-State:
description: Included if the client has the `write_documents` role;
description:
Included if the client has the `write_documents` role;
specifies if the document is currently locked for editing.
example: true
explode: false
Expand All @@ -178,58 +183,60 @@ paths:
description: The document was already locked by another client
headers:
X-Lock-State:
description: Included if the client has edit permissions; specifies
description:
Included if the client has edit permissions; specifies
if the document is currently locked for editing.
explode: false
schema:
type: boolean
style: simple
security:
- basic:
- write_documents
- basic:
- write_documents
summary: Lock access to a document
tags:
- Writing
- Writing
/{judgmentUri}/metadata:
get:
description: "Unless the client has `read_unpublished_documents` permission,\
description:
"Unless the client has `read_unpublished_documents` permission,\
\ then only metadata for published documents are accessible."
parameters:
- explode: false
in: path
name: judgmentUri
required: true
schema:
type: string
style: simple
- explode: false
in: path
name: judgmentUri
required: true
schema:
type: string
style: simple
responses:
"200":
description: OK
security:
- basic:
- read_documents
- read_unpublished_documents
- basic:
- read_documents
- read_unpublished_documents
summary: Gets the document's metadata
tags:
- Reading
- Reading
patch:
parameters:
- explode: false
in: path
name: judgmentUri
required: true
schema:
type: string
style: simple
- explode: false
in: path
name: judgmentUri
required: true
schema:
type: string
style: simple
responses:
"200":
description: OK
security:
- basic:
- write_documents
- basic:
- write_documents
summary: Set document properties
tags:
- Writing
- Writing
components:
parameters:
judgmentUri:
Expand Down Expand Up @@ -262,7 +269,8 @@ components:
type: string
style: simple
X-Lock-State:
description: Included if the client has the `write_documents` role; specifies
description:
Included if the client has the `write_documents` role; specifies
if the document is currently locked for editing.
example: true
explode: false
Expand Down
9 changes: 0 additions & 9 deletions src/openapi_server/apis/writing_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,6 @@ async def judgment_uri_lock_delete(
400: {
"description": "The request was malformed, and the document was not modified",
},
412: {
"description": """Not yet implemented: The document was not updated, as it has changed since
the version number specified If-Match. To avoid this, the client should
lock the document before making any changes to it.""",
},
},
tags=["Writing"],
summary="Update a judgment",
Expand All @@ -151,10 +146,6 @@ async def judgment_uri_patch(
response: Response,
judgmentUri: DocumentURIString,
annotation: str = "",
if_match: str = Header(
None,
description="The last known version number of the document",
),
token_basic: TokenModel = SECURITY_TOKEN_MODEL,
unlock: bool = False,
) -> dict[str, str]:
Expand Down

0 comments on commit fee732c

Please sign in to comment.