Commit Graph

685 Commits

Author SHA1 Message Date
Eric Schubert 887ded5714 [#71358] fixed version read model usage
- improved description of API spec
2026-02-12 13:13:11 +01: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
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
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
Bruno Pagno a293aecb99 Merge pull request #20363 from opf/impl/66328-use-openproject-extension
Update hocuspocus data exchange on collaborative documents
2025-10-21 14:13:04 +02:00
Bruno Pagno 50628ae3fd adjust details for merge
- fix building the URL to hook up the Hocuspocus provider on Blocknote
- remove from documentation a field that should not be available yet on the API (should be released in future versions)
- add a feature flag check on the new documents PATCH endpoint, if it's not enabled we don't take requests yet
2025-10-21 12:57:10 +02:00
Bruno Pagno e9a771dce6 updated documents on documents API 2025-10-20 13:40:27 +02:00
Jan Sandbrink 10cc0cc936 Consistently use the term "endpoint"
TIL that both "end point" and "endpoint" are valid,
but one source on the internet tells me that "endpoint"
is more commonly used and (more importantly) our code base
agrees. A case-sensitive search for "endpoint" gives me over
2000 results, over 300 of these are inside "docs/".
2025-10-17 13:21:50 +02:00
Dombi Attila f600a5844f Add api documentation 2025-10-14 12:01:58 +02:00
Tobias Dillmann b7b9a91ecb [#66093] API: capitalize errors correctly, use compact keys 2025-09-24 19:19:03 +02:00
Tobias Dillmann 9ee1a6eb4e [#66093] API returns calculated value errors 2025-09-24 19:19:03 +02:00
Kabiru Mwenja 0df57ad060 Merge branch 'dev' into merge-release/16.4-20250917064829 2025-09-17 09:52:44 +03:00
Maya Berdygylyjova fefd92f723 [#67375] Update List users API endpoint description (remove wrong men… (#20321)
* [#67375] Update List users API endpoint description (remove wrong mention of permissions)  https://community.openproject.org/work_packages/67375

[#67375] Update List users API endpoint description (remove wrong mention of permissions)

https://community.openproject.org/work_packages/67375

* Update docs/api/apiv3/paths/users.yml

Co-authored-by: Kabiru Mwenja <k.mwenja@openproject.com>

---------

Co-authored-by: Kabiru Mwenja <k.mwenja@openproject.com>
2025-09-17 08:44:23 +02:00
Jens Ulferts 08b0d4401a Merge pull request #20225 from opf/feat/projects-favorites-api
Favorite projects API
2025-09-16 11:55:09 +02:00