Skip to content

Commit

Permalink
Return serialized Record object in API response
Browse files Browse the repository at this point in the history
  • Loading branch information
MusikAnimal committed Feb 15, 2024
1 parent dfe41a4 commit 5274a06
Show file tree
Hide file tree
Showing 7 changed files with 398 additions and 47 deletions.
2 changes: 2 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
"symfony/flex": "^1.3.1",
"symfony/framework-bundle": "^5.4",
"symfony/monolog-bundle": "^3.7",
"symfony/property-access": "5.4.*",
"symfony/serializer": "5.4.*",
"symfony/twig-bundle": "5.4.*",
"symfony/webpack-encore-bundle": "^1.16",
"symfony/yaml": "^5.4",
Expand Down
186 changes: 185 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

86 changes: 62 additions & 24 deletions config/packages/nelmio_api_doc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,57 @@ nelmio_api_doc:
type: object
description: A case of a possible copyright violation
properties:
submission_id:
type: integer
description: The UUID of the submission in the iThenticate database
example: 123e4567-e89b-12d3-a456-426614174000
sources:
type: array
description: The sources associated with the case
items:
type: object
$ref: '#/components/schemas/Source'
page_title:
type: string
description: The full title of the page
example: Draft:Foo bar
page_dead:
type: boolean
description: Whether the page has been deleted
example: false
new_page:
type: boolean
description: Whether the page is new as of this edit
example: false
diff_id:
type: integer
description: The ID of the record in the CopyPatrol database
example: 123456
project:
diff_timestamp:
type: string
description: The name of the project
example: Wikipedia
lang:
type: string
description: The language of the project
example: en
page_namespace:
format: date-time
description: The timestamp of the edit
example: 2021-01-23 12:59
diff_size:
type: integer
description: The namespace ID of the page
example: 0
page_title:
description: The size of the edit
example: -250
summary:
type: string
description: The title of the page
example: Foo_bar
description: The edit summary
example: /* Example summary */
tags:
type: array
description: The tags associated with the edit
items:
type: string
example: [ "mobile edit", "mobile app" ]
wiki_projects:
type: array
description: The WikiProjects associated with the page
items:
type: string
example: [ "Philosophy", "Science" ]
rev_id:
type: integer
description: The revision ID of the edit
Expand All @@ -47,38 +78,45 @@ nelmio_api_doc:
type: integer
description: The parent revision ID of the edit. `0` for new pages
example: 0
rev_user_text:
editor:
type: string
description: The username of the editor
example: Example User
submission_id:
example: Example user
edit_count:
type: integer
description: The UUID of the submission in the iThenticate database
example: 123e4567-e89b-12d3-a456-426614174000
description: The edit count of the editor
example: 123
status:
type: integer
description:
The status of the case.
- `0` for unreviewed
- `1` for fixed
- `2` for no action needed
status_user:
type: string|null
description: The username of the user who last changed the status
example: Example User
status_timestamp:
type: string
format: date-time
description: The timestamp of the last status change
example: 20210123125959
status_user_text:
type: string|null
description: The username of the user who last changed the status
example: Example User
example: 2021-01-23 12:59
project:
type: string
description: The domain of the project
example: en.wikipedia.org
Source:
type: object
description: A source of a possible copyright violation
properties:
source_id:
type: integer
description: The ID of the source in the CopyPatrol database
example: 123456
description:
type: string
description: The description of the URL (FIXME)
# example: "This is a possible copyright violation"
url:
type: string
description: The URL of the source
Expand Down
Loading

0 comments on commit 5274a06

Please sign in to comment.