Skip to content

[DoNotMerge] Demo adding SwaggerUI to documentation#840

Draft
snake14 wants to merge 12 commits into
livefrom
PG-4397-poc-swaggerui-api-docs
Draft

[DoNotMerge] Demo adding SwaggerUI to documentation#840
snake14 wants to merge 12 commits into
livefrom
PG-4397-poc-swaggerui-api-docs

Conversation

@snake14

@snake14 snake14 commented Sep 24, 2025

Copy link
Copy Markdown
Contributor

[DoNotMerge]

Description:

This is to demo adding SwaggerUI to the developer documentation. It's using a local JSON OpenAPI spec file for a few plugins. Browse to /api-reference/reporting-api#openapi-documentation (if you're using DDEV https://devdocs.ddev.site/api-reference/reporting-api#openapi-documentation) to see the changes.

Review

@AltamashShaikh

Copy link
Copy Markdown
Contributor

@snake14 I am not seeing any swagger UI, I ran composer install inside app folder, do I need to do something additional ?

image

@snake14

snake14 commented Sep 24, 2025

Copy link
Copy Markdown
Contributor Author

@snake14 I am not seeing any swagger UI, I ran composer install inside app folder, do I need to do something additional ?

@AltamashShaikh Running composer install should be all that you need. SwaggerUI should be at the bottom where the list of API methods used to be:
image

The hash in the URL should have scrolled your window. I'm not sure why it didn't.

@AltamashShaikh AltamashShaikh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@snake14 app/openapi/demo_matomo_spec_v1.0.0.json Would be pulled directly from demo.matomo.cloud right?

Rest looks good to me, as we are going to update the theming going forward

@AltamashShaikh

Copy link
Copy Markdown
Contributor

Good to check, if this doc would be indexed by searchengines or not

@snake14

snake14 commented Sep 24, 2025

Copy link
Copy Markdown
Contributor Author

@snake14 app/openapi/demo_matomo_spec_v1.0.0.json Would be pulled directly from demo.matomo.cloud right?

Rest looks good to me, as we are going to update the theming going forward

@AltamashShaikh Most likely. This is just a POC.

@snake14

snake14 commented Sep 24, 2025

Copy link
Copy Markdown
Contributor Author

Good to check, if this doc would be indexed by searchengines or not

@AltamashShaikh I'm guessing it's safe to allow indexing as it looks like the site allows indexing for the latest version: https://github.com/matomo-org/developer-documentation/blob/8dd5f6580b9b7de3dfaf901d14468309e4ab27a1/app/templates/base.twig#L10,L12

Comment thread app/helpers/Markdown/IncludeFilePostprocessor.php
Comment thread app/public/index.php Outdated

@james-hill-matomo james-hill-matomo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice updates :)

@snake14

snake14 commented Sep 29, 2025

Copy link
Copy Markdown
Contributor Author

Nice updates :)

Thank you @james-hill-matomo . I think I might convert this back to draft to make it even more obvious it shouldn't be merged.

@snake14 snake14 marked this pull request as draft September 29, 2025 02:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants