-
Notifications
You must be signed in to change notification settings - Fork 1
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
Split openAPI files by tag #971
base: main
Are you sure you want to change the base?
Conversation
500: | ||
$ref: "#/components/responses/ServerError" | ||
/v2/profile: | ||
$ref: './users.yaml#/paths/~1getMe' |
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.
Can't say I love these weird refs or having to list all the APIs here. This is the only way to split it?
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.
openapi spec demands this approach for splitting it. https://swagger.io/docs/specification/using-ref/
@@ -2,2941 +2,166 @@ openapi: 3.0.3 | |||
info: | |||
title: Tanagra Service API | |||
description: github.com/DataBiosphere/tanagra | |||
version: 0.0.0 | |||
version: 0.0.1 |
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.
If none of the APIs changed, why bump the version?
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.
can revert this, thought was that we actually have a deployed version, so '0' might be stale
type: number | ||
format: double | ||
|
||
# --------------- Criteria --------------- |
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.
Criteria are a piece of a cohort or data feature set, not part of the query api or entity model.
# Underlay-Entity APIs, parameters & schema objects | ||
|
||
paths: | ||
/listEntities: |
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.
I think the entity endpoints fit better with the underlay endpoints. Most of the rest of this file are the query endpoints. So perhaps also renaming this to query.yaml would be helpful.
|
||
paths: | ||
# --------------- Unauthenticated Paths --------------- | ||
|
||
"/status": | ||
/status: |
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.
Perhaps moving the unauthenticated endpoints to their own file (e.g. unauthenticated.yaml
) would be clearer, so we always follow the same pattern when adding new endpoints.
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.
Sure I can move them
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.
done
- $ref: '#/components/parameters/ActivityLogFilterExactMatch' | ||
- $ref: '#/components/parameters/ActivityLogFilterResourceType' | ||
- $ref: '#/components/parameters/ActivityLogFilterActivityType' | ||
- $ref: './common.yaml#/components/parameters/Offset' |
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.
It would be great if we don't have to worry about where a shared object is in order to reference it. Could using the same approach that it looks like WSM is using obviate the need for this?
using this approach also needs a change in gradle plugin (from hidelake to openapitools), holding it till I get to those changes |
Split all the single open api file into multiple smaller files, by the path tags. No changes to any path, parameter or schema