refactor: update AS entry handling in API and database to support ASN-only entries. Remove prefix field from AS entry structure and adjust related functions and tests. Enhance OpenAPI specifications and documentation to reflect changes in AS entry representation.
This commit is contained in:
+23
-8
@@ -433,25 +433,38 @@ components:
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
- asn
|
||||
properties:
|
||||
id:
|
||||
$ref: "#/components/schemas/ResourceId"
|
||||
asn:
|
||||
type: ["integer", "null"]
|
||||
prefix:
|
||||
type: ["string", "null"]
|
||||
description: CIDR или префикс в зависимости от модели.
|
||||
type: integer
|
||||
minimum: 1
|
||||
maximum: 4294967295
|
||||
community_id:
|
||||
type: ["string", "null"]
|
||||
additionalProperties: true
|
||||
|
||||
AsEntryCreate:
|
||||
type: object
|
||||
required:
|
||||
- asn
|
||||
properties:
|
||||
asn:
|
||||
type: integer
|
||||
prefix:
|
||||
type: string
|
||||
minimum: 1
|
||||
maximum: 4294967295
|
||||
community_id:
|
||||
type: ["string", "null"]
|
||||
additionalProperties: true
|
||||
|
||||
AsEntryPatch:
|
||||
type: object
|
||||
properties:
|
||||
asn:
|
||||
type: integer
|
||||
minimum: 1
|
||||
maximum: 4294967295
|
||||
community_id:
|
||||
type: ["string", "null"]
|
||||
additionalProperties: true
|
||||
@@ -600,7 +613,9 @@ components:
|
||||
|
||||
PrefixSnapshotItem:
|
||||
type: object
|
||||
description: Элемент материализованного снимка префиксов (детали - по реализации).
|
||||
description: >
|
||||
Элемент материализованного снимка. Поле prefix обычно содержит CIDR;
|
||||
для модулей AS_PREFIXES допускается ключ вида as:<номер_asn> (не CIDR).
|
||||
additionalProperties: true
|
||||
|
||||
Job:
|
||||
@@ -1166,7 +1181,7 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/AsEntryCreate"
|
||||
$ref: "#/components/schemas/AsEntryPatch"
|
||||
responses:
|
||||
"200":
|
||||
description: Успешно.
|
||||
|
||||
Reference in New Issue
Block a user