Skip to content

[Improvement]: Honor methods property for entities backed by tables/views #1771

Open
@kliszaq

Description

@kliszaq

What happened?

When I have a configuration that is read only - GET method on a rest api, then both swagger and /openapi endpoints still all of the methods.
For example:

"entities": {
    "dab_adv2012-sales-currencyrate": {
      "source": {
        "object": "[Sales].[CurrencyRate]",
        "type": "View",
        "key-fields": [
          "CurrencyRateID"
        ]
      },
      "graphql": {
        "enabled": false
      },
      "rest": {
        "methods": [
          "Get"
        ],
        "enabled": true
      },
      "permissions": [
        {
          "role": "anonymous",
          "actions": [
            {
              "action": "Read"
            }
          ]
        }
      ]
    },

produces all the endpoints in swagger and open api.
Expected: the endpoints are limited to the selected rest methods.

Version

0.8.52

What database are you using?

Azure SQL

What hosting model are you using?

Static Web Apps (SWA)

Which API approach are you accessing DAB through?

REST

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions