Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(api): add openapi specification #3540

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ReenigneArcher
Copy link
Member

@ReenigneArcher ReenigneArcher commented Jan 16, 2025

Description

This PR will attempt to provide an openapi spec for the Sunshine rest API. I am not an expert on this, but I believe once this is available it will be possible to automatically create SDKs in various languages using an SDK generator (https://openapi.tools/#sdk).

The idea came from https://plexapi.dev/Open-API-Specification which generates SDKs using "Speakeasy". Unfortunately, I don't believe Speakeasy has a generous open source license/option, so other generators may need to be considered. Still, the repo has been a good example, starting with the main spec file - https://github.com/LukeHagar/plex-api-spec/blob/main/src/pms-spec.yaml

Additionally, there are spec generators for various languages, but none seem to be available for c++, understandably, so this is being manually created.

TODO:

Other notes:

Screenshot

Issues Fixed or Closed

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Dependency update (updates to dependencies)
  • Documentation update (changes to documentation)
  • Repository update (changes to repository files, e.g. .github/...)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated the in code docstring/documentation-blocks for new or existing methods/components

Copy link

codecov bot commented Jan 16, 2025

Codecov Report

Attention: Patch coverage is 0% with 7 lines in your changes missing coverage. Please review.

Project coverage is 10.29%. Comparing base (fb557df) to head (4fa0df4).

Files with missing lines Patch % Lines
src/confighttp.cpp 0.00% 7 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3540   +/-   ##
=======================================
  Coverage   10.29%   10.29%           
=======================================
  Files          90       90           
  Lines       16149    16149           
  Branches     7666     7666           
=======================================
  Hits         1662     1662           
- Misses      13930    13931    +1     
+ Partials      557      556    -1     
Flag Coverage Δ
Linux 9.66% <0.00%> (ø)
Windows 10.75% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/confighttp.cpp 0.00% <0.00%> (ø)

@ReenigneArcher ReenigneArcher force-pushed the feat/api/add-openapi-specification branch 3 times, most recently from 42a3e9a to 5121bda Compare January 17, 2025 01:20
@ReenigneArcher ReenigneArcher force-pushed the feat/api/add-openapi-specification branch from 5121bda to 4fa0df4 Compare January 17, 2025 03:10
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
1 New issue
1 New Code Smells (required ≤ 0)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant