{{ $t('loading') }}
@@ -28,13 +28,11 @@
:options="this.options"
:defaultz="this.defaultz">
-
-
- {{ $t(getTextButton) }}
-
-
+
+ {{ $t(getTextButton) }}
+
@@ -86,9 +84,9 @@ export default {
getSuccessText() {
return (this.context.edit) ? 'address_edit_success' : 'address_new_success';
},
- hideAddress() {
- return (typeof this.options.hideAddress !== 'undefined') ?
- this.options.hideAddress : this.defaultz.hideAddress;
+ onlyButton() {
+ return (typeof this.options.onlyButton !== 'undefined') ?
+ this.options.onlyButton : this.defaultz.onlyButton;
},
forceRedirect() {
return (!(this.context.backUrl === null || typeof this.context.backUrl === 'undefined'));
diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/index.js b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/index.js
index f0a308b7b..9241aa29d 100644
--- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/index.js
+++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/index.js
@@ -53,7 +53,7 @@ containers.forEach((container) => {
},
/// Don't display show renderbox Address: showPane display only a button
- hideAddress: container.dataset.hideAddress === 'true' //boolean, default: false
+ onlyButton: container.dataset.onlyButton === 'true' //boolean, default: false
}
}
}
diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/App.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/App.vue
new file mode 100644
index 000000000..c4c014e19
--- /dev/null
+++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/App.vue
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/OnTheFly/Create.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/components/Create.vue
similarity index 80%
rename from src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/OnTheFly/Create.vue
rename to src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/components/Create.vue
index 3ffb3f7df..f8d221674 100644
--- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/OnTheFly/Create.vue
+++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/components/Create.vue
@@ -3,7 +3,7 @@
-
+
{{ $t('onthefly.create.person') }}
@@ -11,7 +11,7 @@
-
+
{{ $t('onthefly.create.thirdparty') }}
@@ -56,6 +56,7 @@ export default {
radioType: {
set(type) {
this.type = type;
+ console.log('## type:', type, ', action:', this.action);
},
get() {
return this.type;
@@ -71,7 +72,10 @@ export default {
case 'person':
return this.$refs.castPerson.$data.person;
case 'thirdparty':
- return this.$refs.castThirdparty.$data.thirdparty;
+ let data = this.$refs.castThirdparty.$data.thirdparty;
+ data.name = data.text;
+ data.address = { id: data.address.address_id }
+ return data;
default:
throw Error('Invalid type of entity')
}
diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/OnTheFly.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/components/OnTheFly.vue
similarity index 80%
rename from src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/OnTheFly.vue
rename to src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/components/OnTheFly.vue
index 9e5efd86c..237166e62 100644
--- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/OnTheFly.vue
+++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/components/OnTheFly.vue
@@ -1,6 +1,11 @@
-
+
+ {{ buttonText }}
+
+
+
@@ -42,16 +47,16 @@
- {{ $t(buttonMessage) }}
-
-
+
{{ $t('action.save')}}
-
+
@@ -61,7 +66,7 @@
@@ -213,10 +213,10 @@ export default {
div#accompanying-course {
div.vue-component {
& > div.alert.no-person-location {
- margin: 0 0 -1em;
+ margin: 1px 0 0;
}
div.no-person-location {
- padding-bottom: 1.5em;
+ padding-top: 1.5em;
display: flex;
flex-direction: row;
& > i {
diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated/ParticipationItem.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated/ParticipationItem.vue
index 7f01c87e9..e19dfa05e 100644
--- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated/ParticipationItem.vue
+++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated/ParticipationItem.vue
@@ -19,20 +19,8 @@
v-if="hasCurrentHouseholdAddress"
v-bind:person="participation.person">
-
-
-
-
-
-
-
-
+
+
-
+
@@ -22,7 +24,7 @@
@@ -31,7 +33,7 @@
diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/js/i18n.js b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/js/i18n.js
index b1da665a7..f742a6ea0 100644
--- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/js/i18n.js
+++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/js/i18n.js
@@ -1,5 +1,7 @@
-import { personMessages } from 'ChillPersonAssets/vuejs/_js/i18n'
+import { personMessages } from 'ChillPersonAssets/vuejs/_js/i18n';
+import { thirdpartyMessages } from 'ChillThirdPartyAssets/vuejs/_js/i18n';
import { addressMessages } from 'ChillMainAssets/vuejs/Address/i18n';
+import { ontheflyMessages } from 'ChillMainAssets/vuejs/OnTheFly/i18n';
const appMessages = {
fr: {
@@ -48,7 +50,7 @@ const appMessages = {
ok: "Oui, l'usager quitte le parcours",
show_household_number: "Voir le ménage (n° {id})",
show_household: "Voir le ménage",
- person_without_household_warning: "Certaines personnes n'appartiennent à aucun ménage actuellement. Renseignez leur appartenance à un ménage dès que possible.",
+ person_without_household_warning: "Certaines usagers n'appartiennent actuellement à aucun ménage. Renseignez leur appartenance dès que possible.",
update_household: "Modifier l'appartenance",
participation_not_valid: "Sélectionnez ou créez au minimum 1 usager",
},
@@ -82,7 +84,7 @@ const appMessages = {
assign_course_address: "Désigner comme l'adresse du parcours",
remove_button: "Enlever l'adresse",
temporary_address_must_be_changed: "Cette adresse est temporaire. Le parcours devrait être localisé auprès d'un usager concerné.",
- associate_at_least_one_person_with_one_household_with_address: "Associez au moins un membre du parcours à un ménage, et indiquez une adresse à ce ménage.",
+ associate_at_least_one_person_with_one_household_with_address: "Commencez d'abord par associer un membre du parcours à un ménage, et indiquez une adresse à ce ménage.",
sure: "Êtes-vous sûr ?",
sure_description: "Voulez-vous faire de cette adresse l'adresse du parcours ?",
ok: "Désigner comme adresse du parcours",
@@ -141,7 +143,7 @@ const appMessages = {
}
};
-Object.assign(appMessages.fr, personMessages.fr, addressMessages.fr);
+Object.assign(appMessages.fr, personMessages.fr, thirdpartyMessages.fr, addressMessages.fr, ontheflyMessages.fr);
export {
appMessages
diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/store/index.js b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/store/index.js
index 5784e8d4c..ca1a89aa9 100644
--- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/store/index.js
+++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/store/index.js
@@ -11,6 +11,8 @@ import { getAccompanyingCourse,
addScope,
removeScope,
} from '../api';
+import { patchPerson } from "ChillPersonAssets/vuejs/_api/OnTheFly";
+import { patchThirdparty } from "ChillThirdPartyAssets/vuejs/_api/OnTheFly";
const debug = process.env.NODE_ENV !== 'production';
@@ -48,7 +50,7 @@ let initPromise = Promise.all([scopesPromise, accompanyingCoursePromise])
return state.accompanyingCourse.location !== null;
},
isScopeValid(state) {
- console.log('is scope valid', state.accompanyingCourse.scopes.length > 0);
+ //console.log('is scope valid', state.accompanyingCourse.scopes.length > 0);
return state.accompanyingCourse.scopes.length > 0;
},
validationKeys(state, getters) {
@@ -107,6 +109,36 @@ let initPromise = Promise.all([scopesPromise, accompanyingCoursePromise])
//console.log('### mutation: addResource', resource);
state.accompanyingCourse.resources.push(resource);
},
+ updatePerson(state, payload) {
+ console.log('### mutation: updatePerson', payload);
+ let i = null;
+ switch (payload.target) {
+ case 'participation':
+ i = state.accompanyingCourse.participations.findIndex(e => e.person.id === payload.person.id );
+ state.accompanyingCourse.participations[i].person = payload.person;
+ break;
+ case 'requestor':
+ state.accompanyingCourse.requestor = payload.person;
+ break;
+ case 'resource':
+ i = state.accompanyingCourse.resources.findIndex(e => e.resource.id === payload.person.id );
+ state.accompanyingCourse.resources[i].resource = payload.person;
+ break;
+ }
+ },
+ updateThirdparty(state, payload) {
+ console.log('### mutation: updateThirdparty', payload);
+ let i = null;
+ switch (payload.target) {
+ case 'requestor':
+ state.accompanyingCourse.requestor = payload.thirdparty;
+ break;
+ case 'resource':
+ i = state.accompanyingCourse.resources.findIndex(e => e.resource.id === payload.thirdparty.id );
+ state.accompanyingCourse.resources[i].resource = payload.thirdparty;
+ break;
+ }
+ },
toggleIntensity(state, value) {
state.accompanyingCourse.intensity = value;
},
@@ -239,6 +271,38 @@ let initPromise = Promise.all([scopesPromise, accompanyingCoursePromise])
resolve();
})).catch((error) => { commit('catchError', error) });
},
+ patchOnTheFly({ commit }, payload) {
+ console.log('## action: patch OnTheFly', payload);
+ let body = { type: payload.type };
+ if (payload.type === 'person') {
+ body.firstName = payload.data.firstName;
+ body.lastName = payload.data.lastName;
+ if (payload.data.birthdate !== null) { body.birthdate = payload.data.birthdate; }
+ body.phonenumber = payload.data.phonenumber;
+ body.mobilenumber = payload.data.mobilenumber;
+ body.gender = payload.data.gender;
+ console.log('id', payload.data.id, 'and body', body);
+ patchPerson(payload.data.id, body)
+ .then(person => new Promise((resolve, reject) => {
+ console.log('patch person', person);
+ commit('updatePerson', { target: payload.target, person: person });
+ resolve();
+ }));
+ }
+ else if (payload.type === 'thirdparty') {
+ body.name = payload.data.text;
+ body.email = payload.data.email;
+ body.telephone = payload.data.phonenumber;
+ body.address = { id: payload.data.address.address_id };
+ console.log('id', payload.data.id, 'and body', body);
+ patchThirdparty(payload.data.id, body)
+ .then(thirdparty => new Promise((resolve, reject) => {
+ console.log('patch thirdparty', thirdparty);
+ commit('updateThirdparty', { target: payload.target, thirdparty: thirdparty });
+ resolve();
+ }));
+ }
+ },
toggleIntensity({ commit }, payload) {
//console.log(payload);
patchAccompanyingCourse(id, { type: "accompanying_period", intensity: payload })
diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/Household.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/Household.vue
index 98f5b0e45..5904737c8 100644
--- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/Household.vue
+++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/Household.vue
@@ -146,7 +146,7 @@ export default {
validFrom: false,
validTo: false,
},
- hideAddress: true,
+ onlyButton: true,
button: {
text: {
create: 'household_members_editor.household.set_address',
diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_api/OnTheFly.js b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_api/OnTheFly.js
index 6adbc7028..c8031da58 100644
--- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_api/OnTheFly.js
+++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_api/OnTheFly.js
@@ -27,8 +27,27 @@ const postPerson = (body) => {
throw Error('Error with request resource response');
});
};
-
-export {
- getPerson,
- postPerson
+
+/*
+* PATCH an existing person
+*/
+const patchPerson = (id, body) => {
+ const url = `/api/1.0/person/person/${id}.json`;
+ return fetch(url, {
+ method: 'PATCH',
+ headers: {
+ 'Content-Type': 'application/json;charset=utf-8'
+ },
+ body: JSON.stringify(body)
+ })
+ .then(response => {
+ if (response.ok) { return response.json(); }
+ throw Error('Error with request resource response');
+ });
+};
+
+export {
+ getPerson,
+ postPerson,
+ patchPerson
};
diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons.vue
index 160d5d00b..e2415d1e4 100644
--- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons.vue
+++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons.vue
@@ -88,10 +88,11 @@
diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/OnTheFly/ThirdParty.vue b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/OnTheFly/ThirdParty.vue
index 1b1207131..21b79a1c7 100644
--- a/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/OnTheFly/ThirdParty.vue
+++ b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/OnTheFly/ThirdParty.vue
@@ -1,5 +1,5 @@
-
+
-
-
-
- {{ $t('thirdparty.firstname') }}
-
-
- {{ $t('thirdparty.lastname') }}
+
+ {{ $t('thirdparty.name') }}
+
+
+
import ThirdPartyRenderBox from '../Entity/ThirdPartyRenderBox.vue';
-import { getThirdparty, postThirdparty } from '../../_api/OnTheFly';
+import AddAddress from 'ChillMainAssets/vuejs/Address/components/AddAddress';
+import { getThirdparty } from '../../_api/OnTheFly';
export default {
name: "OnTheFlyThirdParty",
props: ['id', 'type', 'action'],
components: {
ThirdPartyRenderBox,
+ AddAddress
},
- data: function() {
+ data() {
return {
+ //context: {}, <--
thirdparty: {
type: 'thirdparty'
+ },
+ addAddress: {
+ options: {
+ openPanesInModal: true,
+ onlyButton: false,
+ button: {
+ size: 'btn-sm'
+ },
+ title: {
+ create: 'add_an_address_title',
+ edit: 'edit_address'
+ }
+ }
}
}
},
+ computed: {
+ context() {
+ let context = {
+ target: {
+ name: this.type,
+ id: this.id
+ },
+ edit: false,
+ addressId: null
+ };
+ if ( typeof this.thirdparty.address !== 'undefined'
+ && this.thirdparty.address.address_id !== null
+ ) { // to complete
+ context.addressId = this.thirdparty.address.address_id;
+ context.edit = true;
+ }
+ console.log('context', context);
+ //this.context = context; <--
+ return context;
+ },
+ },
methods: {
- loadThirdparty(){
+ loadData(){
getThirdparty(this.id).then(thirdparty => new Promise((resolve, reject) => {
this.thirdparty = thirdparty;
+ console.log('get thirdparty', thirdparty);
+ if (this.action !== 'show') {
+ // bof! we force getInitialAddress because addressId not available when mounted
+ this.$refs.addAddress.getInitialAddress(thirdparty.address.address_id);
+ }
resolve();
}));
},
- postData() {
- postThirdparty(this.thirdparty).then(thirdparty => new Promise((resolve, reject) => {
- this.thirdparty = thirdparty;
- resolve();
- }))
+ submitAddress(payload) {
+ console.log('submitAddress', payload);
+ if (typeof payload.addressId !== 'undefined') { // <--
+ this.context.edit = true;
+ this.context.addressId = payload.addressId; // bof! use legacy and not legacy in payload
+ this.thirdparty.address = payload.address; // <--
+ console.log('switch address to edit mode', this.context);
+ }
}
},
mounted() {
- if (this.action !== 'create'){
- this.loadThirdparty();
+ if (this.action !== 'create') {
+ this.loadData();
}
},
}
diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_js/i18n.js b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_js/i18n.js
new file mode 100644
index 000000000..37d09320d
--- /dev/null
+++ b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_js/i18n.js
@@ -0,0 +1,11 @@
+const thirdpartyMessages = {
+ fr: {
+ thirdparty: {
+ name: "Dénomination",
+ email: "Courriel",
+ phonenumber: "Téléphone",
+ }
+ }
+};
+
+export { thirdpartyMessages };
diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/index.html.twig b/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/index.html.twig
index fa9ad8b8b..1cd1a6257 100644
--- a/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/index.html.twig
+++ b/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/index.html.twig
@@ -51,7 +51,7 @@
{{ (tp.active ? '' : '')|raw }}
{{ tp.name }}
{% set types = [] %}
- {% for t in tp.type %}
+ {% for t in tp.types %}
{% set types = types|merge( [ ('chill_3party.key_label.'~t)|trans ] ) %}
{% endfor %}
{{ types|join(', ') }}
diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/new.html.twig b/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/new.html.twig
index 002cc87e8..319083649 100644
--- a/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/new.html.twig
+++ b/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/new.html.twig
@@ -26,7 +26,7 @@
{{ form_row(form.profession) }}
{% endif %}
- {{ form_row(form.type) }}
+ {{ form_row(form.types) }}
{{ form_row(form.categories) }}
{{ form_row(form.telephone) }}
diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/show.html.twig b/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/show.html.twig
index d711bdefa..a8dc587d7 100644
--- a/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/show.html.twig
+++ b/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/show.html.twig
@@ -48,7 +48,7 @@
{{ 'Type'|trans }}
{% set types = [] %}
- {% for t in thirdParty.type %}
+ {% for t in thirdParty.types %}
{% set types = types|merge( [ ('chill_3party.key_label.'~t)|trans ] ) %}
{% endfor %}
diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/update.html.twig b/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/update.html.twig
index 01837db05..4433d934b 100644
--- a/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/update.html.twig
+++ b/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/update.html.twig
@@ -43,7 +43,7 @@
{{ form_row(form.profession) }}
{% endif %}
- {{ form_row(form.type) }}
+ {{ form_row(form.types) }}
{{ form_row(form.categories) }}
{{ form_row(form.telephone) }}
diff --git a/src/Bundle/ChillThirdPartyBundle/Security/Voter/ThirdPartyVoter.php b/src/Bundle/ChillThirdPartyBundle/Security/Voter/ThirdPartyVoter.php
index a1ce94e25..ab78c7701 100644
--- a/src/Bundle/ChillThirdPartyBundle/Security/Voter/ThirdPartyVoter.php
+++ b/src/Bundle/ChillThirdPartyBundle/Security/Voter/ThirdPartyVoter.php
@@ -56,11 +56,15 @@ class ThirdPartyVoter extends AbstractChillVoter implements ProvideRoleHierarchy
*/
protected function voteOnAttribute($attribute, $subject, TokenInterface $token)
{
+ return true;
+
$user = $token->getUser();
if (!$user instanceof User) {
return false;
}
+
+ return true;
$centers = $this->authorizationHelper
->getReachableCenters($user, new Role($attribute));
diff --git a/src/Bundle/ChillThirdPartyBundle/chill.api.specs.yaml b/src/Bundle/ChillThirdPartyBundle/chill.api.specs.yaml
index 957bf9324..52db7589c 100644
--- a/src/Bundle/ChillThirdPartyBundle/chill.api.specs.yaml
+++ b/src/Bundle/ChillThirdPartyBundle/chill.api.specs.yaml
@@ -8,17 +8,57 @@ servers:
- url: "/api"
description: "Your current dev server"
+components:
+ schemas:
+ Thirdparty:
+ type: object
+ properties:
+ id:
+ type: integer
+ readOnly: true
+ type:
+ type: string
+ enum:
+ - "thirdparty"
+ name:
+ type: string
+ email:
+ type: string
+ telephone:
+ type: string
+ address:
+ $ref: "#/components/schemas/Address"
+ Address:
+ type: object
+ properties:
+ id:
+ type: integer
+
+
paths:
/1.0/thirdparty/thirdparty.json:
- get:
+ post:
tags:
- thirdparty
- summary: Return a list of all thirdparty items
+ summary: Create a single thirdparty
+ requestBody:
+ description: "A thirdparty"
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Thirdparty"
responses:
200:
- description: "ok"
- 401:
+ description: "OK"
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Thirdparty"
+ 403:
description: "Unauthorized"
+ 422:
+ description: "Invalid data"
/1.0/thirdparty/thirdparty/{id}.json:
get:
@@ -41,3 +81,32 @@ paths:
description: "not found"
401:
description: "Unauthorized"
+ patch:
+ tags:
+ - thirdparty
+ summary: "Alter a thirdparty"
+ parameters:
+ - name: id
+ in: path
+ required: true
+ description: The thirdparty's id
+ schema:
+ type: integer
+ format: integer
+ minimum: 1
+ requestBody:
+ description: "A thirdparty"
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Thirdparty"
+ responses:
+ 401:
+ description: "Unauthorized"
+ 404:
+ description: "Not found"
+ 200:
+ description: "OK"
+ 422:
+ description: "Object with validation errors"