Skip to content

Commit

Permalink
Merge pull request #22 from CommonGateway/feature/WOO-141/publication…
Browse files Browse the repository at this point in the history
…-subscriber

PublicationSubcriber
  • Loading branch information
bbrands02 authored May 31, 2024
2 parents 4670499 + 48b229c commit 7791f94
Show file tree
Hide file tree
Showing 37 changed files with 260 additions and 46 deletions.
1 change: 0 additions & 1 deletion Installation/Schema/Attachment.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
},
"type": {
"type": "string",
"format": "mime-type",
"description": "The MIME type of the attachment, determined at the time of reading and recorded for display in the UI. This value is automatically updated and thus cannot be set via the API"
},
"extension": {
Expand Down
3 changes: 1 addition & 2 deletions Installation/Schema/Index.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
},
"image": {
"type": "string",
"format": ["url", "base64"],
"description": "An image for the index, such as a logo. Can be provided as a reference `url` or `base64` encoded image"
},
"url": {
Expand All @@ -53,7 +52,7 @@
},
"organization": {
"type": "object",
"$ref": "https://raw.githubusercontent.com/CommonGateway/OpenIndex/main/Installation/Schema/Organization.schema.json",
"$ref": "https://openwoo.app/schemas/organization.schema.json",
"format": "json",
"description": "The organization that provides this index (acts as the default for publications in the index)"
}
Expand Down
1 change: 0 additions & 1 deletion Installation/Schema/Organization.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
},
"image": {
"type": "string",
"format": ["url", "base64"],
"description": "An image for the subject, can be provided as a reference `url` or `base64` encoded image"
},
"uuid": {
Expand Down
18 changes: 5 additions & 13 deletions Installation/Schema/Publication.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
},
"image": {
"type": "string",
"format": ["url", "base64"],
"description": "An image for the publication, can be provided as a reference `url` or `base64` encoded image"
},
"category": {
Expand Down Expand Up @@ -72,7 +71,7 @@
},
"organization": {
"type": "object",
"$ref": "https://raw.githubusercontent.com/CommonGateway/OpenIndex/main/Installation/Schema/Organization.schema.json",
"$ref": "https://openwoo.app/schemas/organization.schema.json",
"format": "json",
"description": "The organization belonging to this publication object, in theory multiple organizations can share one Open Index installation but this is discouraged."
},
Expand All @@ -81,12 +80,12 @@
"format": "url",
"description": "Schemas add predictability and interpretability to the objects published under `data`. They describe the object contained in `data` and the conditions it must meet. For this, we use the [json-schema](https://json-schema.org/) which is itself part of [OAS 3](https://swagger.io/specification/). In the `schema` property, we expect a URL reference to a publicly accessible schema.json object. This could be on a website or GitHub, for instance. During `POST` and `PUT` actions on the publication object, the object in `data` is tested against this schema. Additionally, a consuming party can use the URL to retrieve the schema so they can interpret the object in `data`.",
"required": true,
"examples": ["https://raw.githubusercontent.com/CommonGateway/OpenIndex/main/Installation/Schema/Metadata.tooi_adviezen.schema.json"]
"examples": ["https://openwoo.app/schemas/metadata.tooi_adviezen.schema.json"]
},
"attachments": {
"type": "array",
"items": {
"$ref": "https://raw.githubusercontent.com/CommonGateway/OpenIndex/main/Installation/Schema/Attachment.schema.json"
"$ref": "https://openwoo.app/schemas/attachment.schema.json"
},
"format": "json"
},
Expand All @@ -96,15 +95,8 @@
"description":"The urls of the theme's associated with this publication"
},
"data": {
"type": "object",
"format": "json",
"description": "The actual object to be published (must not be larger than 15 MB)",
"oneOf": [
{"$ref": "https://raw.githubusercontent.com/CommonGateway/OpenIndex/main/Installation/Schema/Metadata.tooi_verzoeken_en_besluiten.schema.json"},
{"$ref": "https://raw.githubusercontent.com/CommonGateway/OpenIndex/main/Installation/Schema/Metadata.tooi_organisatie_en_werkwijze.schema.json"},
{"$ref": "https://raw.githubusercontent.com/CommonGateway/OpenIndex/main/Installation/Schema/Metadata.tooi_adviezen.schema.json"},
{"$ref": "https://raw.githubusercontent.com/CommonGateway/OpenIndex/main/Installation/Schema/Metadata.tooi_subsidieverplichtingen_anders_dan_met_beschikking.schema.json"}
]
"type": "array",
"description": "The actual object to be published (must not be larger than 15 MB)"
}
},
"required": [
Expand Down
1 change: 0 additions & 1 deletion Installation/Schema/Theme.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
},
"image": {
"type": "string",
"format": ["url","base64"],
"description":"An image for the theme, can be provided as a reference `url` or `base64` encoded image"
},
"publications": {
Expand Down
13 changes: 13 additions & 0 deletions Installation/installation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"endpoints": {
"schemas": [
{
"$id": "https://openwoo.app/publication.endpoint.json",
"reference": "https://openwoo.app/schemas/publication.schema.json",
"path": "publications",
"methods": [],
"version": "0.0.1"
}
]
}
}
28 changes: 28 additions & 0 deletions Resources/config/services.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This file is the entry point to configure your own services.
services:
# default configuration for services in *this* file
_defaults:
autowire: true # Automatically injects dependencies in your services.
autoconfigure: true # Automatically registers your services as commands, event subscribers, etc.

# makes classes in src/ available to be used as services
# this creates a service per class whose id is the fully-qualified class name
CommonGateway\OpenIndex\:
resource: '../../src/'
exclude:
- '../../src/DependencyInjection/'
- '../../src/Entity/'
- '../../src/Resources/'
- '../../src/OpenIndex.php'

# this config only applies to the services created by this file
_instanceof:
# actionHandlers whose classes are instances of ActionHandlerInterface will be tagged automatically and set to public
CommonGateway\OpenIndex\ActionHandler\ActionHandlerInterface:
public: true
tags: ['commongateway.action_handlers']

# installers whose classes are instances of InstallerInterface will be tagged automatically and set to public
CommonGateway\OpenIndex\Installer\InstallerInterface:
public: true
tags: ['commongateway.installer']
2 changes: 1 addition & 1 deletion docs/schema/Attachment.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

An attachment object

![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/main/docs/schema/Attachment.svg)
![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/publication-subscriber/docs/schema/Attachment.svg)

## Properties

Expand Down
2 changes: 1 addition & 1 deletion docs/schema/Index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

An externally found index that can be used as a source in federative search queries

![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/main/docs/schema/Index.svg)
![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/publication-subscriber/docs/schema/Index.svg)

## Properties

Expand Down
2 changes: 1 addition & 1 deletion docs/schema/Metadata.oc_publiccode.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Adviezen over ontwerpen en andere onderwerpen van adviescolleges of -commissies, exclusief adviezen die betrekking hebben op individuele gevallen.

![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/main/docs/schema/Metadata.oc_publiccode.svg)
![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/publication-subscriber/docs/schema/Metadata.oc_publiccode.svg)

## Properties

Expand Down
2 changes: 1 addition & 1 deletion docs/schema/Metadata.ods_agenda_item.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Adviezen over ontwerpen en andere onderwerpen van adviescolleges of -commissies, exclusief adviezen die betrekking hebben op individuele gevallen.

![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/main/docs/schema/Metadata.ods_agenda_item.svg)
![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/publication-subscriber/docs/schema/Metadata.ods_agenda_item.svg)

## Properties

Expand Down
2 changes: 1 addition & 1 deletion docs/schema/Metadata.tooi_adviezen.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Adviezen over ontwerpen en andere onderwerpen van adviescolleges of -commissies, exclusief adviezen die betrekking hebben op individuele gevallen.

![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/main/docs/schema/Metadata.tooi_adviezen.svg)
![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/publication-subscriber/docs/schema/Metadata.tooi_adviezen.svg)

## Properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Agenda’s en besluitenlijsten van vergaderingen van diverse bestuurlijke organen.

![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/main/docs/schema/Metadata.tooi_agendas_en_besluitenlijsten_bestuurscolleges.svg)
![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/publication-subscriber/docs/schema/Metadata.tooi_agendas_en_besluitenlijsten_bestuurscolleges.svg)

## Properties

Expand Down
2 changes: 1 addition & 1 deletion docs/schema/Metadata.tooi_bereikbaarheidsgegevens.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Bereikbaarheidsinformatie van bestuursorganen en hun organisatieonderdelen.

![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/main/docs/schema/Metadata.tooi_bereikbaarheidsgegevens.svg)
![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/publication-subscriber/docs/schema/Metadata.tooi_bereikbaarheidsgegevens.svg)

## Properties

Expand Down
2 changes: 1 addition & 1 deletion docs/schema/Metadata.tooi_beschikkingen.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Beschikkingen, uitgezonderd specifieke categorieën.

![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/main/docs/schema/Metadata.tooi_beschikkingen.svg)
![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/publication-subscriber/docs/schema/Metadata.tooi_beschikkingen.svg)

## Properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Ingekomen stukken bij diverse overheidsorganen, uitgezonderd bepaalde vertrouwelijke informatie of individuele gevallen.

![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/main/docs/schema/Metadata.tooi_bij_vertegenwoordigende_organen_ingekomen_stukken.svg)
![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/publication-subscriber/docs/schema/Metadata.tooi_bij_vertegenwoordigende_organen_ingekomen_stukken.svg)

## Properties

Expand Down
2 changes: 1 addition & 1 deletion docs/schema/Metadata.tooi_convenanten.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Convenanten.

![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/main/docs/schema/Metadata.tooi_convenanten.svg)
![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/publication-subscriber/docs/schema/Metadata.tooi_convenanten.svg)

## Properties

Expand Down
2 changes: 1 addition & 1 deletion docs/schema/Metadata.tooi_jaarplannen_en_jaarverslagen.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Jaarplannen en jaarverslagen van bestuursorganen over hun taakuitvoering.

![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/main/docs/schema/Metadata.tooi_jaarplannen_en_jaarverslagen.svg)
![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/publication-subscriber/docs/schema/Metadata.tooi_jaarplannen_en_jaarverslagen.svg)

## Properties

Expand Down
2 changes: 1 addition & 1 deletion docs/schema/Metadata.tooi_klachtoordelen.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Schriftelijke oordelen in klachtprocedures.

![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/main/docs/schema/Metadata.tooi_klachtoordelen.svg)
![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/publication-subscriber/docs/schema/Metadata.tooi_klachtoordelen.svg)

## Properties

Expand Down
2 changes: 1 addition & 1 deletion docs/schema/Metadata.tooi_onderzoeksrapporten.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Onderzoeksrapporten opgesteld op verzoek van bestuursorganen die geen taakuitvoering zijn, gericht op organisatie of beleidsevaluatie.

![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/main/docs/schema/Metadata.tooi_onderzoeksrapporten.svg)
![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/publication-subscriber/docs/schema/Metadata.tooi_onderzoeksrapporten.svg)

## Properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Ontwerpen van wetgeving waarover extern advies is gevraagd, inclusief de adviesaanvraag.

![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/main/docs/schema/Metadata.tooi_ontwerpen_van_wet_en_regelgeving_met_adviesaanvraag.svg)
![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/publication-subscriber/docs/schema/Metadata.tooi_ontwerpen_van_wet_en_regelgeving_met_adviesaanvraag.svg)

## Properties

Expand Down
2 changes: 1 addition & 1 deletion docs/schema/Metadata.tooi_organisatie_en_werkwijze.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Informatie over de organisatie en werkwijze van bestuursorganen.

![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/main/docs/schema/Metadata.tooi_organisatie_en_werkwijze.svg)
![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/publication-subscriber/docs/schema/Metadata.tooi_organisatie_en_werkwijze.svg)

## Properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Overige besluiten van algemene strekking.

![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/main/docs/schema/Metadata.tooi_overige_besluiten_van_algemene_strekking.svg)
![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/publication-subscriber/docs/schema/Metadata.tooi_overige_besluiten_van_algemene_strekking.svg)

## Properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Subsidieverplichtingen die niet via een beschikking lopen, specifiek bij Ministerie van Binnenlandse Zaken.

![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/main/docs/schema/Metadata.tooi_subsidieverplichtingen_anders_dan_met_beschikking.svg)
![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/publication-subscriber/docs/schema/Metadata.tooi_subsidieverplichtingen_anders_dan_met_beschikking.svg)

## Properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Vergaderstukken en verslagen van diverse decentrale overheden en hun commissies.

![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/main/docs/schema/Metadata.tooi_vergaderstukken_decentrale_overheden.svg)
![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/publication-subscriber/docs/schema/Metadata.tooi_vergaderstukken_decentrale_overheden.svg)

## Properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Vergaderstukken en verslagen van de Staten-Generaal, uitgezonderd vertrouwelijke informatie verstrekt aan de Staten-Generaal.

![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/main/docs/schema/Metadata.tooi_vergaderstukken_staten_generaal.svg)
![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/publication-subscriber/docs/schema/Metadata.tooi_vergaderstukken_staten_generaal.svg)

## Properties

Expand Down
2 changes: 1 addition & 1 deletion docs/schema/Metadata.tooi_verzoeken_en_besluiten.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Inhoud van schriftelijke Woo-verzoeken en besluiten daarop, inclusief verstrekte informatie.

![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/main/docs/schema/Metadata.tooi_verzoeken_en_besluiten.svg)
![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/publication-subscriber/docs/schema/Metadata.tooi_verzoeken_en_besluiten.svg)

## Properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Wetten en andere algemeen verbindende voorschriften.

![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/main/docs/schema/Metadata.tooi_wetten_en_algemeen_verbindende_voorschriften.svg)
![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/publication-subscriber/docs/schema/Metadata.tooi_wetten_en_algemeen_verbindende_voorschriften.svg)

## Properties

Expand Down
2 changes: 1 addition & 1 deletion docs/schema/Organization.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

An organization that provides a publication or index

![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/main/docs/schema/Organization.svg)
![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/publication-subscriber/docs/schema/Organization.svg)

## Properties

Expand Down
4 changes: 2 additions & 2 deletions docs/schema/Publication.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

The publication object is the core of Open Index, acting as a metadata wrapper for objects and thereby forming the common link between different publications from, for example, WOO and OC.

![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/main/docs/schema/Publication.svg)
![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/publication-subscriber/docs/schema/Publication.svg)

## Properties

Expand All @@ -21,4 +21,4 @@ The publication object is the core of Open Index, acting as a metadata wrapper f
| schema | string | Schemas add predictability and interpretability to the objects published under `data`. They describe the object contained in `data` and the conditions it must meet. For this, we use the [json-schema](https://json-schema.org/) which is itself part of [OAS 3](https://swagger.io/specification/). In the `schema` property, we expect a URL reference to a publicly accessible schema.json object. This could be on a website or GitHub, for instance. During `POST` and `PUT` actions on the publication object, the object in `data` is tested against this schema. Additionally, a consuming party can use the URL to retrieve the schema so they can interpret the object in `data`. | Yes |
| attachments | array | N/A | No |
| themes | array | The urls of the theme's associated with this publication | No |
| data | object | The actual object to be published (must not be larger than 15 MB) | No |
| data | array | The actual object to be published (must not be larger than 15 MB) | No |
2 changes: 1 addition & 1 deletion docs/schema/Publication.puml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ class Publication {
+ schema: string
+ attachments: array
+ themes: array
+ data: object
+ data: array
}
@enduml
2 changes: 1 addition & 1 deletion docs/schema/Theme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

A thematic clustering of publications in a manner logical for searching, can also be used for topics. Themes exist within a single index and are thus organization specific unless the index is shared by multiple organizations

![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/main/docs/schema/Theme.svg)
![Class Diagram](https://github.com/CommonGateway/OpenIndex/blob/publication-subscriber/docs/schema/Theme.svg)

## Properties

Expand Down
2 changes: 1 addition & 1 deletion docs/schema/all_schema_classes.puml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ class Publication {
+ schema: string
+ attachments: array
+ themes: array
+ data: object
+ data: array
}
class Attachment {
+ id: string
Expand Down
2 changes: 1 addition & 1 deletion docs/schema/all_schema_classes.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 7791f94

Please sign in to comment.