chore(build)

pull/17/head
Dominique Merle 4 years ago
parent b59926d716
commit 4cd2fd1375

@ -1,6 +1,6 @@
# Mieux Voter OpenAPI Definition
This reposority hosts the OpenAPI specification for the API of MieuxVoter,
This reposority hosts the **OpenAPI specifications** for the API of MieuxVoter,
a Majority Judgment polling application spearheaded by the french nonprofit
[MieuxVoter.fr](https://mieuxvoter.fr).

@ -1,12 +1,12 @@
# Warning: this file has been automatically generated. All manual modifications will be lost, see README.md for details.
openapi: 3.0.0
info:
title: Mieux Voter
description: A poll application based on Majority Judgment.
title: API Mieux Voter
description: "## What is this?\n\nAn _Application Programming Interface_ (API) for a polling application\nusing **Majority Judgment**.\n\nYou are looking at the specifications of the communication between server and clients, usually because you want to make your own client.\n\n### Help, I'm lost!\n\nBest head to the official application client, then:\n[Application MieuxVoter](https://app.mieuxvoter.fr).\nSee you there !\n\n\n## What is Majority Judgment?\n\nWe believe that it is the most elegant polling system that is available right now.\n\nIt was discovered in 2002 by \U0001F1EB\U0001F1F7 french researchers, and it comes from \U0001F377 wine \U0001F3C6 contests.\n\n\n## Contributing\n\n### I've found a bug!\n\nHead over to our [issues tracker](https://github.com/MieuxVoter/mv-api-spec/issues) with your ideas and contributions.\n\n### But I don't understand code!\n\nIt's okay, we need everyone!\nThere's lots you can do to help, such as translating, documenting, reporting issues, painting pixels, promoting majority judgment…\n\n### Shut up and take my money!\n\nDonations help us boost development : [Donate](https://mieuxvoter.fr/index.php/participer/).\n"
version: 1.0.1-oas3
termsOfService: 'https://github.com/MieuxVoter'
contact:
name: Mieux Voter app developpers team
name: Mieux Voter App Development Team
email: app@mieuxvoter.fr
servers:
- url: 'https://api.mieuxvoter.fr/v1'
@ -367,72 +367,95 @@ components:
description: A unique identifier
example: 4
readOnly: true
mention:
grade:
type: integer
description: >-
The mention item, according to the mentions array defined when
creating the poll.
description: >
One grade of the grading defined when creating the poll. Zero (0)
means the worst grade, and it goes upwards from there, up to the
size of the grading, minus one.
example: 2
proposal:
type: object
properties:
id:
type: integer
description: A unique identifier.
readOnly: true
type: integer
description: >
A unique identifier for the proposal, in the context of the poll.
This is not a globally unique identifier.
example: 4
uuid:
readOnly: true
type: string
format: uuid
description: |
A Universally Unique IDentifier for the proposal. (UUIDv4)
example: fa888652-727e-470b-817e-d77862a8d112
name:
type: string
description: Unique but short name of the proposal.
description: |
Unique but short name of the proposal. No markup is allowed.
example: A new school
description:
type: string
description: >
An optional, multiline description of the proposal. Commonmark
markdown is allowed.
example: This school would welcome 500 pupils.
ballots:
type: array
description: The ballots received by this proposal.
description: >
The ballots received by this proposal. Each participant may emit one
ballot (one judgment) per proposal.
items:
$ref: '#/components/schemas/ballot'
description:
type: string
description: An optional description of the proposal
example: This school would welcome 500 pupils.
required:
- name
mention:
grade:
type: object
properties:
id:
type: integer
description: A unique identifier
description: >
Unique identifier of the grade in its grading. Zero (0) is the worst
grade, and it goes upwards.
example: 0
readOnly: true
name:
type: string
description: >-
Unique but short name of the mention, like *Excellent* or *To
reject*.
example: Excellent
description: |
Unique but short name of the grade, like "Excellent" or "To reject".
example: Good
description:
type: string
description: An optional description of the mention
example: 'In this poll, the mention *To reject* disqualifies the proposal.'
description: An optional description of the grade.
example: 'In this poll, the grade "To reject" disqualifies the proposal.'
required:
- name
participant:
type: object
properties:
id:
readOnly: true
type: string
description: A unique identifier.
example: JtRm05yjMAuFCI2uwnFp
readOnly: true
description:
name:
type: string
maxLength: 32
description: An optional name or pseudonym for the participant.
example: Jane Doe
email:
type: string
description: An optional description of the participant.
example: John Doe
has-participed:
description: >
The electronic mail address that will eventually be created at the
creation of the participant (not kept in memory).
example: jane.doe@example.com
has-participated:
type: boolean
description: >-
True if the participant already participed to the poll, False
otherwise.
True if the participant already participated to the poll, False
otherwise
example: true
poll-id:
type: string
@ -442,44 +465,59 @@ components:
type: string
description: The identifier of the user.
example: 1jDe1e5eF_IkaYPuoIYX
mail:
type: string
description: >-
The mail that will eventually created at the creation of the
participant (not kept in memory).
example: john-doe@example.com
required:
- poll-id
poll:
type: object
description: >
A `Poll` is the core model of the application.
A `Poll` exposes a list of `Proposal`s, and `Participant`s may
individually give each `Proposal` a `Grade`. (in a `Ballot`)
properties:
id:
type: string
description: A unique identifier
description: A unique identifier.
example: 1jDe1e5eF_IkaYPuoIYX
readOnly: true
uuid:
type: string
format: uuid
pattern: '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}'
description: |
A Universally Unique IDentifier for the poll. (version 4)
example: bb788552-727d-470b-827e-d7796248d293
readOnly: true
title:
type: string
description: The title of the poll.
example: What project should our neighbourhood invest in for the next year?
description: The title of the poll
description:
type: string
description: A description of the poll
example: null
description: >
A lengthy description of the poll. In here should be stated the
constitutive details of the poll, whether it is informative or
imperative for example.
example: >
This poll will help decide which projects get the most attention and
budget so you should consider the proposals carefully and with
gumption.
proposals:
type: array
description: The proposals being voted in a poll.
description: >
The proposals being judged by the participants in a poll. It makes
no sense to have less than two proposals in a poll.
minItems: 2
maxItems: 20
items:
$ref: '#/components/schemas/proposal'
mentions:
grades:
type: array
description: The mentions on which one participant vote to a proposal.
description: The grades on which one participant vote to a proposal.
minItems: 2
maxItems: 10
items:
$ref: '#/components/schemas/mention'
$ref: '#/components/schemas/grade'
participants:
type: array
description: The participants that are allowed to participate to the election.
@ -490,7 +528,7 @@ components:
description: 'Organizer id. If not given, a dummy user is created.'
restrict-participants:
type: boolean
description: 'True if anyone can participate to this poll, False otherwise.'
description: 'True if anyone can participate in this poll, False otherwise.'
example: false
required:
- title
@ -517,9 +555,9 @@ components:
ranking:
type: array
description: >-
An array representing mentions level for each proposal, according to
the mentions list, following the order of the proposals array
defined when the related poll has been created.
An array representing grades level for each proposal, according to
the grades list, following the order of the proposals array defined
when the related poll has been created.
example:
- 0
- 6

Loading…
Cancel
Save