-
Notifications
You must be signed in to change notification settings - Fork 5
fix: update api spec and linting #87
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
Conversation
WalkthroughBroad OpenAPI spec updates: removal of platform parameter and path renames to /pc, schema cleanups (removing expired/eta and some requireds), timestamp standardization, addition of Sentient Outposts schema and reference, worldstate object pruning, global security array added, and @redocly/cli bumped with start script change. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant C as Client
participant API as API (/pc/sentientOutposts)
participant WS as Worldstate Service
participant DS as Data Source
Note over API: No auth (security: [])
C->>API: GET /pc/sentientOutposts
API->>WS: Fetch sentient outposts
WS->>DS: Retrieve mission/outpost data
DS-->>WS: Data (timestamps, mission, active)
WS-->>API: Object per sentientOutposts schema
API-->>C: 200 JSON (sentientOutposts)
Note right of C: Response conforms to<br/>components/schemas/sentientOutposts
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Assessment against linked issues
Assessment against linked issues: Out-of-scope changes
Poem
✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
openapi/paths/{platform}@sentientOutposts.yaml (1)
2-2: operationId still implies platform; rename for accuracy and stabilityPlatform param was removed; keeping
getOutpostsByPlatformis misleading and may break codegen diffs later. SuggestgetSentientOutpost.-operationId: getOutpostsByPlatform +operationId: getSentientOutpost
🧹 Nitpick comments (8)
openapi/components/schemas/darkSectors.yaml (1)
5-5: Typo fix aligns required with property — good.Required key now matches defenderDeploymentActivation. Consider normalizing this to timestamp schema if it’s a date, not a number.
openapi/components/schemas/sortie.yaml (1)
54-54: Add trailing newline.YAML lint warns about missing newline at EOF.
- - description: Unlocalized Faction of the boss controlling the sortie + - description: Unlocalized Faction of the boss controlling the sortie +openapi/components/schemas/worldstateObject.yaml (1)
13-13: Good: reuse shared timestamp. Also align activation?expiry now $ref’s timestamp.yaml; consider doing the same for activation for consistency/validation parity.
activation: - type: string - minLength: 1 - format: date-time - description: ISO-8601 formatted timestamp for when the event began + $ref: ./timestamp.yamlopenapi/components/schemas/syndicateMission.yaml (1)
26-28: Good centralization to timestamp schema; add EOF newline.Refs look correct; add a trailing newline to satisfy linters.
activation: $ref: ./timestamp.yaml +openapi/paths/{platform}@sentientOutposts.yaml (1)
8-8: Remove unnecessary backslash escapes in descriptionBackslashes before apostrophes aren’t needed in a YAML block scalar; they’ll render literally.
- data from DE\'s worldstate and [semlar\'s data](https://semlar.com/anomaly.json) + data from DE's worldstate and [semlar's data](https://semlar.com/anomaly.json)openapi/components/schemas/sentientOutposts.yaml (3)
1-11: Consider locking schema surfaceDisallow unknown keys at the top level for tighter contracts.
type: object # derive type from https://api.warframestat.us/pc/sentientOutposts/?language=en required: @@ - active properties: @@ - mission: + mission: type: object + additionalProperties: false +additionalProperties: false
24-36: Align naming and duplication between node fieldsYou have
nodeat the top level and alsomission.node(both described as localized node name). If both are needed, clarify how they differ (e.g., top-level node vs. mission node) or dedupe.
1-9: Plural filename vs singular payloadSchema file is plural (
sentientOutposts.yaml), but the payload represents a single object. Either rename to singular, or make this an array of objects if multiple can appear.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (52)
openapi/components/schemas/alert.yaml(0 hunks)openapi/components/schemas/archonHunt.yaml(0 hunks)openapi/components/schemas/cambionCycle.yaml(0 hunks)openapi/components/schemas/cetusCycle.yaml(0 hunks)openapi/components/schemas/conclaveChallenges.yaml(0 hunks)openapi/components/schemas/darkSectors.yaml(1 hunks)openapi/components/schemas/earthCycle.yaml(0 hunks)openapi/components/schemas/fissure.yaml(0 hunks)openapi/components/schemas/flashSales.yaml(0 hunks)openapi/components/schemas/globalUpgrades.yaml(0 hunks)openapi/components/schemas/invasion.yaml(0 hunks)openapi/components/schemas/sentientOutposts.yaml(1 hunks)openapi/components/schemas/sortie.yaml(1 hunks)openapi/components/schemas/syndicateMission.yaml(1 hunks)openapi/components/schemas/timestamp.yaml(1 hunks)openapi/components/schemas/worldstateObject.yaml(1 hunks)openapi/components/schemas/ws.yaml(1 hunks)openapi/openapi.yaml(1 hunks)openapi/paths/{platform}.yaml(0 hunks)openapi/paths/{platform}@alerts.yaml(0 hunks)openapi/paths/{platform}@arbitration.yaml(0 hunks)openapi/paths/{platform}@archonHunt.yaml(0 hunks)openapi/paths/{platform}@cambionCycle.yaml(0 hunks)openapi/paths/{platform}@cetusCycle.yaml(0 hunks)openapi/paths/{platform}@conclaveChallenges.yaml(0 hunks)openapi/paths/{platform}@constructionProgress.yaml(0 hunks)openapi/paths/{platform}@dailyDeals.yaml(0 hunks)openapi/paths/{platform}@darkSectors.yaml(0 hunks)openapi/paths/{platform}@deepArchimedea.yaml(0 hunks)openapi/paths/{platform}@earthCycle.yaml(0 hunks)openapi/paths/{platform}@events.yaml(0 hunks)openapi/paths/{platform}@fissures.yaml(0 hunks)openapi/paths/{platform}@flashSales.yaml(0 hunks)openapi/paths/{platform}@globalUpgrades.yaml(0 hunks)openapi/paths/{platform}@invasions.yaml(0 hunks)openapi/paths/{platform}@kuva.yaml(0 hunks)openapi/paths/{platform}@news.yaml(0 hunks)openapi/paths/{platform}@nightwave.yaml(0 hunks)openapi/paths/{platform}@persistentEnemies.yaml(0 hunks)openapi/paths/{platform}@rivens.yaml(0 hunks)openapi/paths/{platform}@rivens@search@{query}.yaml(0 hunks)openapi/paths/{platform}@sentientOutposts.yaml(2 hunks)openapi/paths/{platform}@simaris.yaml(0 hunks)openapi/paths/{platform}@sortie.yaml(0 hunks)openapi/paths/{platform}@steelPath.yaml(0 hunks)openapi/paths/{platform}@syndicateMissions.yaml(0 hunks)openapi/paths/{platform}@timestamp.yaml(0 hunks)openapi/paths/{platform}@vallisCycle.yaml(0 hunks)openapi/paths/{platform}@vaultTrader.yaml(0 hunks)openapi/paths/{platform}@voidTrader.yaml(0 hunks)openapi/paths/{platform}@voidTraders.yaml(0 hunks)package.json(1 hunks)
💤 Files with no reviewable changes (42)
- openapi/paths/{platform}@syndicateMissions.yaml
- openapi/paths/{platform}@cetusCycle.yaml
- openapi/paths/{platform}@simaris.yaml
- openapi/components/schemas/globalUpgrades.yaml
- openapi/paths/{platform}@earthCycle.yaml
- openapi/paths/{platform}@persistentEnemies.yaml
- openapi/paths/{platform}@deepArchimedea.yaml
- openapi/paths/{platform}@events.yaml
- openapi/components/schemas/cambionCycle.yaml
- openapi/paths/{platform}@news.yaml
- openapi/paths/{platform}@flashSales.yaml
- openapi/paths/{platform}@alerts.yaml
- openapi/components/schemas/cetusCycle.yaml
- openapi/paths/{platform}@rivens.yaml
- openapi/paths/{platform}@constructionProgress.yaml
- openapi/paths/{platform}.yaml
- openapi/components/schemas/invasion.yaml
- openapi/paths/{platform}@darkSectors.yaml
- openapi/components/schemas/flashSales.yaml
- openapi/paths/{platform}@rivens@search@{query}.yaml
- openapi/paths/{platform}@invasions.yaml
- openapi/paths/{platform}@voidTraders.yaml
- openapi/paths/{platform}@vallisCycle.yaml
- openapi/paths/{platform}@globalUpgrades.yaml
- openapi/paths/{platform}@fissures.yaml
- openapi/components/schemas/alert.yaml
- openapi/paths/{platform}@nightwave.yaml
- openapi/paths/{platform}@steelPath.yaml
- openapi/paths/{platform}@cambionCycle.yaml
- openapi/paths/{platform}@archonHunt.yaml
- openapi/paths/{platform}@kuva.yaml
- openapi/paths/{platform}@vaultTrader.yaml
- openapi/components/schemas/fissure.yaml
- openapi/paths/{platform}@dailyDeals.yaml
- openapi/paths/{platform}@arbitration.yaml
- openapi/paths/{platform}@conclaveChallenges.yaml
- openapi/paths/{platform}@voidTrader.yaml
- openapi/paths/{platform}@timestamp.yaml
- openapi/components/schemas/conclaveChallenges.yaml
- openapi/components/schemas/earthCycle.yaml
- openapi/paths/{platform}@sortie.yaml
- openapi/components/schemas/archonHunt.yaml
🧰 Additional context used
🪛 YAMLlint (1.37.1)
openapi/components/schemas/syndicateMission.yaml
[error] 28-28: no new line character at the end of file
(new-line-at-end-of-file)
openapi/components/schemas/sortie.yaml
[error] 54-54: no new line character at the end of file
(new-line-at-end-of-file)
🔇 Additional comments (7)
package.json (2)
13-13: Start script updated to v2 syntax — good."openapi preview" replaces "preview-docs" in v2. LGTM.
6-6: Approve @redocly/cli v2 bump Scripts (openapi bundle,openapi lint,openapi preview,openapi split) align with documented v2 syntax and flags (redocly.com); legacyopenapialias remains supported, but consider migrating scripts to useredocly(github.com).openapi/components/schemas/ws.yaml (1)
71-72: New sentientOutposts field wired — good.Property added and referenced; it’s also included in required (Line 17). Verify upstream producer always supplies it to avoid breaking clients.
openapi/openapi.yaml (2)
43-43: Explicit global “no auth” is fine.security: [] at root clearly declares no auth. LGTM.
105-106: No typo: both vaultTrader and voidTrader references are valid
Both/pc/vaultTraderand/pc/voidTraderhave matching files ({platform}@vaultTrader.yamland{platform}@voidTrader.yaml), so no changes are required.openapi/paths/{platform}@sentientOutposts.yaml (2)
1-1: Path filename still includes {platform}The file path
{platform}@sentientOutposts.yamlsuggests a templated segment, which conflicts with the PR note about migrating to/pc/.... Ensure the actual path is updated/renamed to the non-parameterized variant to keep the spec coherent.
12-25: Model empty “no outpost” responses explicitly
No existing endpoints define a 204 or nullable payload in this spec—pick either Option A (add a ‘204’ response) or Option B (mark the 200 schema as nullable) and update all endpoints for consistency.
What did you fix?
closes #84
lints all the things
Reproduction steps
Evidence/screenshot/link to line
Considerations
Summary by CodeRabbit
New Features
Refactor
Documentation
Chores