745 Commits

Author SHA1 Message Date
Eric Schubert 594e10d4ef [chore] improve API specification for meetings
- triggered by removing API spec validation warning
2026-02-13 16:10:04 +01:00
Eric Schubert 425c50a2a1 [chore] fixed integer examples 2026-02-13 15:16:07 +01:00
OpenProject Actions CI 14663b471a Merge branch 'release/17.1' into dev 2026-02-13 04:18:41 +00:00
Eric Schubert 887ded5714 [#71358] fixed version read model usage
- improved description of API spec
2026-02-12 13:13:11 +01:00
Dombi Attila c7eb130469 Merge branch 'dev' into merge-release/17.1-20260212041910 2026-02-12 10:28:06 +02:00
Eric Schubert 10d472052d [#71358] improve API specification for versions
- split into read and write models
- add custom field pattern properties
- improved description for endpoints
- add extracted examples
2026-02-11 16:35:03 +01:00
Eric Schubert db6aaaa984 [#71358] add search version tool
- https://community.openproject.org/work_packages/71358
- add tool
- add specs for the tool
- slightly improve version model for the api
2026-02-11 16:34:04 +01:00
Eric Schubert 19e09ecad1 [chore] fixed group response example 2026-02-11 14:43:08 +01:00
Eric Schubert abbaf045c5 [chore] fix api spec validation
- validation script used unmaintained npm package
- switched to actively maintained package from same maintainer
- pipe full output to stdout
- bump node major version in development backend Dockerfile
- fix two api spec errors and two random warnings - boyscout, hell yeah
2026-02-11 14:11:20 +01:00
Jens Ulferts 1250412525 Merge pull request #21856 from opf/bug/59360-unexplicable-the-changes-were-retracted-journal-entries-automatic-subjects
Bug/59360 inexplicable the changes were retracted journal entries automatic subjects
2026-02-10 09:19:19 +01:00
Jan Sandbrink 8ca3c9eb66 Test portfolio and program schema against representer
Both are rendered through the ProjectRepresenter (because they are technically
implemented as Projects), but haven't been tested against it yet.

This also means that they still included required properties that were already
removed from the project schema (this was an error in the schema).
2026-02-06 15:50:27 +01:00
ulferts 794f9fab9d add placeholder property to schema model 2026-02-06 11:42:55 +01:00
ulferts 0e9e9bb912 fix faulty key in schema model 2026-02-06 11:42:37 +01:00
ulferts a1032a55a2 move placeholder functionality to backend schema 2026-02-05 17:04:08 +01:00
Jan Sandbrink 4d305df714 Allow to use API Tokens as Bearer tokens
We generate those tokens with a prefix, so that we
can decide by looking at a token, whether it's an API Token
or a different kind of token, so that we can decide which
code path to choose for validating the token.

The usage of access tokens as Bearer token has the usability advantage,
that you can paste them as plaintext into tools that expect you
to specify the token as a header.

Also the Basic auth approach for our old tokens usually rather caused
issues, such as browsers prompting for credentials in surprising situations.
If we were to deprecate basic authentication one day, this change today could've
been the first step towards that.
2026-02-05 08:07:04 +01:00
ulferts 53273d5fdf always generate subject unless overridden - no placeholder text set 2026-02-03 12:09:22 +01:00
Kabiru Mwenja f77d0d6130 Merge pull request #21800 from opf/bug/70979-bug-api-v3-allows-reading-writing-internal-comments-when-the-enable-internal-comments-project-setting-is-disabled
Bug/70979 api v3 allows reading writing internal comments when the enable internal comments project setting is disabled
2026-01-29 16:34:23 +03:00
Kabiru Mwenja 1bca833cd5 Remove workspace aliasing unless confirmed 2026-01-29 13:50:24 +03:00
Copilot 4ca0236c42 Add test coverage and OpenAPI documentation for workspace configuration endpoint 2026-01-29 13:42:05 +03:00
Kabiru Mwenja 8dbac61c57 Add project-scoped configuration API [OP#70979]
Adds `GET /api/v3/projects/:id/configuration` endpoint that returns
all global configuration properties plus project-specific settings.

This allows client apps to check both enterprise token features
(availableFeatures) and project settings (enabledInternalComments)
in a single API call.
2026-01-29 10:32:29 +03:00
Jan Sandbrink ac4e9626ee Add MCP resource handling
Allows to list resources and resource templates and reading
their contents.
2026-01-26 13:22:44 +01:00
Andrej f3fcdd6580 Merge branch 'dev' into merge-release/17.0-20260114130218 2026-01-14 14:07:25 +01:00
as-op facdd3385e fix links 2026-01-14 13:37:30 +01:00
as-op f6f6dbe1d7 fix anchor links in api-docs 2026-01-14 12:22:23 +01:00
Alexander Brandon Coles 8c6676b92e Merge branch 'dev' into merge-release/17.0-20260112162124 2026-01-12 13:24:48 -03:00
Eric Schubert 995f7c4763 [#70356] add character p for capabilities filter
- https://community.openproject.org/work_packages/70356
- readd p for projects in context and id filter
- add deprecation warning - to be removed in 17.2
2026-01-09 13:16:38 +01:00
Jan Sandbrink bb46732d61 Validate schema of examples stored outside of schema definition
Those are usually linked through other OpenAPI specification
documents and different examples can refer to the same specification.

Fixed violations along the way, most of them were typos in either the
schema or the example. In one case a wrong schema was referenced, most likely
because the name was sufficiently confusing. The reference went to
`query_filter_instance_schema_model`, when it should have been `query_filter_instance_model`.
Sadly, the latter didn't even exist as a schema. I changed the reference and added a schema
based on what I could find in our implemented representer. It was consistent with examples.
2025-12-18 15:55:58 +01:00
Jan Sandbrink e183a48a7b Fix formatting of type 2025-12-17 14:03:25 +01:00
Jan Sandbrink 1572cf9b9e Change a few occurences of examples to example
All of them only contained a single example anyways. This
change immediately enabled validation of the example against
the schema in specs, which uncovered a wrong schema.

Examples and the implementation of the TimeEntryRepresenter
agreed that the comment was a formattable, but the schema claimed
it would be a string.
2025-12-17 13:57:55 +01:00
Jan Sandbrink c1722373c4 Validate schema of embedded examples in a spec
Our schemas often contain embedded examples that show what a representation
will look like.
These specs ensure that those embedded examples conform to the schema
that they are an example for.

Some collection examples contained abbreviated examples for what they look like.
To support these, the previously added _hint key was replaced with an explicit
_abbreviated key and examples that include this key are skipped.
2025-12-16 10:08:24 +01:00
Jan Sandbrink 8e92a0ba52 Improve formatting of schema
In YAML, null is interpreted as a literal null value,
but we intended to use it as the string "null".

For consistency the first element of the array was also formatted
in double quotes and the array is now also formatted across
multiple lines.
2025-12-15 11:11:00 +01:00
Jan Sandbrink 0728d07ad1 Self-test basic schema compliance for a few API models
Those self-tests are "basic" in the sense that they only validate
their compliance with our documented schema in one representation.

These test cases don't yet cover/validate whether the generated
representation also fulfills the schema under different circumstances,
for example when rendering for a user with fewer privileges, not allowed
to see certain fields.

Where necessary, the schema was changed to reflect the reality, e.g.
when those tests revealed that a "required" field might be missing due to
a lack of permissions.

In a few cases the implementation was adapted to allow for stricter guarantees
of the specified schema, for example links allowed to leave out the title key
already, so its not necessary to emit `title: nil` in cases where a title is
not known.
2025-12-15 11:10:34 +01:00
Eric Schubert 1b6dc6c173 [#68226] refine api item read model 2025-12-10 16:29:51 +01:00
Eric Schubert 49c3dce7f0 [#68226] use formatted weight for hierarchy items
- hierarachy item now return a weight and a formatted weight in the API
  response
- weight is the accurate value
- formatted weight is the value in display representation after standard
  formatting
2025-12-10 15:37:49 +01:00
ulferts a911744b47 prevent portfolios having a parent 2025-11-26 18:09:47 +01:00
Jens Ulferts 957534e3e7 Merge pull request #21148 from opf/implementation/67278-add-api-v3-workspaces-representer-references
Workspace references in representers and auxiliary endpoints
2025-11-26 12:05:34 +01:00
Jens Ulferts ca0770eeb2 Merge pull request #21144 from opf/implementation/67278-add-api-v3-workspaces-endpoints
Adding workspace types endpoints
2025-11-26 12:05:24 +01:00
ulferts 1c66a89ca4 reallow non project resources to be returned via the projects index endpoint 2025-11-26 11:06:34 +01:00
ulferts 84b44fb0e1 fix faulty project reference in api doc 2025-11-26 10:15:04 +01:00
Oliver Günther b4ba847ee0 Fix spec 2025-11-26 09:55:13 +01:00
ulferts 7653fbf66b workspace references in representers and auxilliary endpoints 2025-11-25 16:47:59 +01:00
ulferts 75fbbf03f6 fix and adapt api docs 2025-11-25 16:32:59 +01:00
ulferts d03bf6a763 adding workspace types endpoints 2025-11-25 16:32:58 +01:00
Ivan Kuchin 4942c9fff4 add workspace_type parameter to available_parent_projects endpoint 2025-11-24 13:51:07 +01:00
as-op 892efa7910 do not use heading markdown as formatting 2025-11-05 14:56:49 +01:00
Dombi Attila f9dcd5d525 [#63550] Add validateCustomFields api flag documentation
https://community.openproject.org/work_packages/63550
2025-10-23 17:36:51 +03:00
OpenProject Actions CI 83c3a928f9 Merge branch 'release/16.5' into release/16.6 2025-10-23 10:30:15 +00:00
as-op bbf020c3f9 create 8bit PNGs, reduce color palettes, max width 2000 px 2025-10-23 11:52:29 +02:00
ulferts edf3c709e3 Merge remote-tracking branch 'origin/dev' into feature/63550-allow-editing-of-individual-work-package-project-attributes-even-if-certain-other-attributes-are-invalid-eg-required-field-empty 2025-10-22 18:17:40 +02:00
Dombi Attila 2f3d9440bc Add groups custom field api documenation. 2025-10-22 17:24:15 +03:00