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

chore: specify required fields in open api specs #173

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

admy7
Copy link
Contributor

@admy7 admy7 commented Dec 16, 2024

No description provided.

@admy7 admy7 self-assigned this Dec 16, 2024
Copy link

sourcery-ai bot commented Dec 16, 2024

Reviewer's Guide by Sourcery

This PR updates the OpenAPI specification by refining required fields and schema references. The changes primarily focus on cleaning up the schema definitions by explicitly marking required fields and removing optional ones from the required list. It also extracts the query operator enum into a separate reusable schema component.

ER Diagram for Updated OpenAPI Specification

erDiagram
    DatasetSearchQueryFacet {
        ARRAY entries
        STRING source
        STRING type
        STRING key
        STRING label
    }
    DatasetSearchQueryFacet ||--o{ QueryEntry : contains
    QueryEntry {
        STRING key
        STRING value
    }
    QueryOperator {
        STRING operator
    }
    DatasetSearchQueryFacet ||--o{ QueryOperator : uses
    DatasetsSearchResponse {
        STRING id
        STRING title
        STRING description
    }
    RetrievedDistribution {
        STRING id
        STRING title
        STRING description
    }
    ValueLabel {
        STRING value
        STRING label
    }
    ErrorResponse {
        STRING title
        STRING status
        STRING detail
    }
Loading

File-Level Changes

Change Details Files
Extract query operator enum into a separate schema component
  • Created new QueryOperator schema component with OR/AND enum values
  • Updated operator field to reference the new QueryOperator schema instead of inline enum
src/main/openapi/discovery.yaml
Add missing required field declarations for various schema components
  • Added required fields for QueryEntry (key, value)
  • Added required fields for Filter (source, type, key, label)
  • Added required fields for FilterEntry (key, label)
  • Added required fields for ErrorResponse (title, status)
src/main/openapi/discovery.yaml
Remove optional fields from required lists in dataset-related schemas
  • Removed catalogue and modifiedAt from SearchedDataset required fields
  • Removed catalogue and createdAt from RetrievedDataset required fields
  • Removed createdAt from RetrievedDistribution required fields
src/main/openapi/discovery.yaml
Clean up contact-related schema definitions
  • Removed identifier field from ContactPoint required fields
  • Removed uri field from Organization required fields
src/main/openapi/discovery.yaml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @admy7 - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

brunopacheco1
brunopacheco1 previously approved these changes Dec 16, 2024
@brunopacheco1 brunopacheco1 merged commit af2a833 into main Dec 17, 2024
5 checks passed
@brunopacheco1 brunopacheco1 deleted the open-api-specify-required-fields branch December 17, 2024 10:31
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.

3 participants