Skip to content

Generate API docs - #6319

Merged
SchrodingersGat merged 34 commits into
inventree:masterfrom
SchrodingersGat:generate-api-docs
Feb 8, 2024
Merged

SchrodingersGat merged 34 commits into
inventree:masterfrom
SchrodingersGat:generate-api-docs

Conversation

@SchrodingersGat

@SchrodingersGat SchrodingersGat commented Jan 22, 2024 •

Copy link
Copy Markdown
Member

Working towards external generation of API docs.

A BIG part of this PR will be removing our custom filter_queryset methods which do secret filtering that does not get exposed to the autodocs.

Ref: #6435

- Some provided options were not correct
- `/api/plugins/activate` routed to PluginActivate view
- Must be associated with a specific plugin ID
…-api-docs

# Conflicts:
#	InvenTree/InvenTree/api.py
#	InvenTree/InvenTree/settings.py
#	InvenTree/common/api.py
#	InvenTree/plugin/api.py
#	InvenTree/stock/api.py
#	InvenTree/users/api.py
- Specify serializer
- Use RetrieveAPI class type
# Conflicts:
#	InvenTree/users/api.py
#	requirements.txt
@SchrodingersGat SchrodingersGat added the CI CI / unit testing ecosystem label Jan 22, 2024
@SchrodingersGat SchrodingersGat added this to the 0.14.0 milestone Jan 22, 2024
@netlify

netlify Bot commented Jan 22, 2024 •

Copy link
Copy Markdown

✅ Deploy Preview for inventree-web-pui-preview ready!

Name Link
🔨 Latest commit 734750c
🔍 Latest deploy log https://app.netlify.com/sites/inventree-web-pui-preview/deploys/65c45d873b7f5a0008931726
😎 Deploy Preview https://deploy-preview-6319--inventree-web-pui-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 100 (no change from production)
Accessibility: 86 (no change from production)
Best Practices: 100 (no change from production)
SEO: 70 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@matmair

matmair commented Jan 22, 2024

Copy link
Copy Markdown
Member

Maybe related to #6269?

Comment thread .github/workflows/qc_checks.yaml Resolved
@matmair

matmair commented Feb 6, 2024

Copy link
Copy Markdown
Member
grafik 7 unique errors left to go!

@matmair matmair added the enhancement This is an suggested enhancement or new feature label Feb 6, 2024
Comment on lines +360 to +367
class APISearchViewSerializer(serializers.Serializer):
"""Serializer for the APISearchView."""

search = serializers.CharField()
search_regex = serializers.BooleanField(default=False, required=False)
search_whole = serializers.BooleanField(default=False, required=False)
limit = serializers.IntegerField(default=1, required=False)
offset = serializers.IntegerField(default=0, required=False)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@SchrodingersGat I have added only the base inputs for now. We expose a lot of models as optional parameters - should we add them to the serializer? Seems to add a bunch of duplication
grafik

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'm happy to leave as-is for now. We can always update later on

@SchrodingersGat SchrodingersGat added the api Relates to the API label Feb 6, 2024
@matmair

matmair commented Feb 7, 2024

Copy link
Copy Markdown
Member

@SchrodingersGat all errors are gone but there is still a bunch of warnings that require separating reference names for enums and operations. How set are you on solving them?

@matmair matmair mentioned this pull request Feb 7, 2024
@matmair

matmair commented Feb 7, 2024

Copy link
Copy Markdown
Member

@SchrodingersGat are you aware of invoke schema?

@SchrodingersGat

Copy link
Copy Markdown
Member Author

@SchrodingersGat are you aware of invoke schema?

I am now :) There are so many features now, I had forgotten about that. I have now removed the duplicate task

@SchrodingersGat
SchrodingersGat merged commit af4d888 into inventree:master Feb 8, 2024
@SchrodingersGat

Copy link
Copy Markdown
Member Author

@matmair thanks for the help getting this one passing :)

This was referenced Feb 8, 2024
@SchrodingersGat
SchrodingersGat deleted the generate-api-docs branch February 20, 2024 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api Relates to the API CI CI / unit testing ecosystem enhancement This is an suggested enhancement or new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants