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

[8.x] [ResponseOps][Rules] Add OAS schema for handled 4xx errors on rule apis (#192616) #193454

Merged
merged 1 commit into from
Sep 19, 2024

Commits on Sep 19, 2024

  1. [ResponseOps][Rules] Add OAS schema for handled 4xx errors on rule ap…

    …is (elastic#192616)
    
    ## Summary
    
    Closes elastic#188514
    
    Adds OAS schemas for the `403 Forbidden` errors that public rule apis
    can return if a license is invalid, `400 Bad Request` for unregistered
    rule types, and `404 Not Found` for missing saved objects.
    
    ### Checklist
    
    - [x] Any text added follows [EUI's writing
    guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
    sentence case text and includes [i18n
    support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
    - [x]
    [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
    was added for features that require explanation or tutorials
    
    ### Testing
    
    1. Start ES
    2. Add `server.oas.enabled: true` to `kibana.dev.yml`
    3. Start Kibana `yarn start --no-base-path`
    4. `curl -s -uelastic:changeme
    http://localhost:5601/api/oas\?pathStartsWith\=/api/alerting/rule/ | jq`
    (If you have `jq` installed, otherwise pipe to `pbcopy` and paste the
    result into a JSON prettifier)
    5. Search the output for the word `Forbidden` to ensure this schema has
    been added to `create`, `update`, `enable`, `disable`, `mute`, `unmute`,
    and `update_rule_api_key`
    
    ---------
    
    Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
    Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
    (cherry picked from commit 18afcae)
    Zacqary committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    8a4a3bd View commit details
    Browse the repository at this point in the history