Skip to content

Commit 38f0915

Browse files
committed
Merge branch 'staging'
2 parents e29610e + 8b2b4cf commit 38f0915

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

src/api/commons/queries/structures.query.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import currentCategoryQuery from './current-category.query';
2+
import currentLegalCategoryQuery from './current-legal-category.query';
13
import currentLocalisationQuery from './current-localisation.query';
24
import currentNameQuery from './current-name.query';
35
import metas from './metas.query';
@@ -6,6 +8,8 @@ import officialtextLightQuery from './official-texts.light.query';
68
export default [
79
...metas,
810
...currentLocalisationQuery,
11+
...currentLegalCategoryQuery,
12+
...currentCategoryQuery,
913
...currentNameQuery,
1014
{
1115
$lookup: {
@@ -32,6 +36,7 @@ export default [
3236
_id: 0,
3337
id: 1,
3438
alternativePaysageIds: { $ifNull: ['$alternativePaysageIds', []] },
39+
category: { $ifNull: ['$category', {}] },
3540
closureDate: { $ifNull: ['$closureDate', null] },
3641
closureOfficialText: { $ifNull: ['$closureOfficialText', {}] },
3742
closureOfficialTextId: { $ifNull: ['$closureOfficialTextId', null] },
@@ -45,6 +50,7 @@ export default [
4550
descriptionEn: { $ifNull: ['$descriptionEn', null] },
4651
descriptionFr: { $ifNull: ['$descriptionFr', null] },
4752
exercice: { $ifNull: ['$exercice', null] },
53+
legalcategory: { $ifNull: ['$legalcategory', {}] },
4854
motto: { $ifNull: ['$motto', null] },
4955
netAccountingResult: { $ifNull: ['$netAccountingResult', null] },
5056
population: { $ifNull: ['$population', null] },

src/openapi/schemas/structures/structure.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
title: Structure
22
description: Representation of a structure
33
readOnly: true
4-
allOf:
4+
allOf:
55
- type: object
66
properties:
77
id:
@@ -68,4 +68,8 @@ allOf:
6868
population:
6969
type: integer
7070
nullable: true
71-
- $ref: '../../api.yml#/components/schemas/Metas'
71+
category:
72+
type: object
73+
legalcategory:
74+
type: object
75+
- $ref: '../../api.yml#/components/schemas/Metas'

0 commit comments

Comments
 (0)