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

OpenAPI spec differs from response on /control/dhcp/interfaces #7510

Closed
4 tasks done
jmaister opened this issue Dec 16, 2024 · 2 comments
Closed
4 tasks done

OpenAPI spec differs from response on /control/dhcp/interfaces #7510

jmaister opened this issue Dec 16, 2024 · 2 comments
Assignees
Milestone

Comments

@jmaister
Copy link

jmaister commented Dec 16, 2024

Prerequisites

Platform (OS and CPU architecture)

Windows, AMD64 (aka x86_64)

Installation

Docker

Setup

On one machine

AdGuard Home version

AdGuard Home, version v0.107.53

Action

Replace the following command with the one you're calling or a
description of the failing action:

C:\Users\jordi>curl -u USER:PASS -X GET http://localhost/control/dhcp/interfaces

Expected result

The response differes from the OpenAPI spec defined in the project: https://github.com/AdguardTeam/AdGuardHome/blob/master/openapi/openapi.yaml

The current result based on OpenAPI returns a list of ip_addresses but the API returns ipv4_addresses and ipv6_addresses:

Also, the gateway_ip field is missing in the spec.

    'NetInterface':
      'type': 'object'
      'description': 'Network interface info'
      'required':
      - 'flags'
      - 'hardware_address'
      - 'name'
      - 'mtu'
      'properties':
        'flags':
          'type': 'string'
          'description': >
            Flags could be any combination of the following values, divided by
            the "|" character: "up", "broadcast", "loopback", "pointtopoint" and
            "multicast".
          'example': 'up|broadcast|multicast'
        'hardware_address':
          'type': 'string'
          'example': '52:54:00:11:09:ba'
        'name':
          'type': 'string'
          'example': 'eth0'
        'ip_addresses':
          'type': 'array'
          'items':
            'type': 'string'
        'mtu':
          'type': 'integer'

Actual result

{"eth0":{"name":"eth0","hardware_address":"02:42:ac:14:00:02","flags":"up|broadcast|multicast|running","gateway_ip":"172.20.0.1","ipv4_addresses":["172.20.0.2"],"ipv6_addresses":null}}

Additional information and/or screenshots

No response

@jmaister jmaister changed the title OpenAPI spec differes from response on /control/dhcp/status OpenAPI spec differs from response on /control/dhcp/interfaces Dec 16, 2024
@ainar-g
Copy link
Contributor

ainar-g commented Dec 17, 2024

@EugeneOne1, please investigate.

@EugeneOne1
Copy link
Member

@jmaister, hello and thank you for bringing this to our attention. We've updated the openapi/openapi.yaml specification, it's available since 261c159.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants