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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add apim el module and apim el schema endpoint #6938

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

a-cordier
Copy link
Member

@a-cordier a-cordier commented Mar 16, 2024

see https://gravitee.atlassian.net/browse/APIM-558

Gravitee.io - APIM - EL module

This module contains a Schema class used to generate a JSON Schema describing which objects are available when using expression language in APIM. This can be useful e.g. to implement intelliSense in a UI or generate documentation.

[GET] management/v2/el/schema.json

{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "$defs": {
        "EvaluableSSLPrincipal": {
            "type": "object",
            "properties": {
                "attributes": {
                    "$ref": "#/$defs/MultiValueMap(String,String)",
                    "additionalProperties": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    }
                },
                "businessCategory": {
                    "type": "string"
                },
                "c": {
                    "type": "string"
                },
                "cn": {
                    "type": "string"
                },
                "countryOfCitizenship": {
                    "type": "string"
                },
                "countryOfResidence": {
                    "type": "string"
                },
                "dateOfBirth": {
                    "type": "string"
                },
                "dc": {
                    "type": "string"
                },
                "description": {
                    "type": "string"
                },
                "dmdName": {
                    "type": "string"
                },
                "dn": {
                    "type": "string"
                },
                "dnQualifier": {
                    "type": "string"
                },
                "e": {
                    "type": "string"
                },
                "emailAddress": {
                    "type": "string"
                },
                "gender": {
                    "type": "string"
                },
                "generation": {
                    "type": "string"
                },
                "givenname": {
                    "type": "string"
                },
                "initials": {
                    "type": "string"
                },
                "l": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "nameAtBirth": {
                    "type": "string"
                },
                "o": {
                    "type": "string"
                },
                "organizationIdentifier": {
                    "type": "string"
                },
                "ou": {
                    "type": "string"
                },
                "placeOfBirth": {
                    "type": "string"
                },
                "postalAddress": {
                    "type": "string"
                },
                "postalCode": {
                    "type": "string"
                },
                "pseudonym": {
                    "type": "string"
                },
                "role": {
                    "type": "string"
                },
                "serialnumber": {
                    "type": "string"
                },
                "st": {
                    "type": "string"
                },
                "street": {
                    "type": "string"
                },
                "surname": {
                    "type": "string"
                },
                "t": {
                    "type": "string"
                },
                "telephoneNumber": {
                    "type": "string"
                },
                "uid": {
                    "type": "string"
                },
                "uniqueIdentifier": {
                    "type": "string"
                },
                "unstructuredAddress": {
                    "type": "string"
                }
            }
        },
        "HttpHeaders": {
            "type": "object"
        },
        "Map(String,Object)": {
            "type": "object"
        },
        "Map(String,String)": {
            "type": "object",
            "additionalProperties": {
                "type": "string"
            }
        },
        "MultiValueMap(String,String)": {
            "type": "object",
            "additionalProperties": {
                "type": "array",
                "items": {
                    "type": "string"
                }
            }
        }
    },
    "type": "object",
    "properties": {
        "api": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "properties": {
                    "$ref": "#/$defs/Map(String,String)",
                    "additionalProperties": {
                        "type": "string"
                    }
                },
                "version": {
                    "type": "string"
                }
            }
        },
        "context": {
            "type": "object",
            "properties": {
                "attributes": {
                    "$ref": "#/$defs/Map(String,Object)"
                }
            }
        },
        "dictionaries": {
            "type": "object",
            "additionalProperties": {
                "$ref": "#/$defs/Map(String,String)",
                "additionalProperties": {
                    "type": "string"
                }
            }
        },
        "node": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "string"
                },
                "shardingTags": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "tenant": {
                    "type": "string"
                },
                "version": {
                    "type": "string"
                },
                "zone": {
                    "type": "string"
                }
            }
        },
        "request": {
            "type": "object",
            "properties": {
                "content": {
                    "type": "string"
                },
                "contextPath": {
                    "type": "string"
                },
                "headers": {
                    "$ref": "#/$defs/HttpHeaders"
                },
                "host": {
                    "type": "string"
                },
                "id": {
                    "type": "string"
                },
                "jsonContent": {
                    "$ref": "#/$defs/Map(String,Object)"
                },
                "localAddress": {
                    "type": "string"
                },
                "method": {
                    "type": "string"
                },
                "params": {
                    "$ref": "#/$defs/MultiValueMap(String,String)",
                    "additionalProperties": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    }
                },
                "path": {
                    "type": "string"
                },
                "pathInfo": {
                    "type": "string"
                },
                "pathInfos": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "pathParams": {
                    "$ref": "#/$defs/MultiValueMap(String,String)",
                    "additionalProperties": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    }
                },
                "paths": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "remoteAddress": {
                    "type": "string"
                },
                "scheme": {
                    "type": "string"
                },
                "ssl": {
                    "type": "object",
                    "properties": {
                        "client": {
                            "$ref": "#/$defs/EvaluableSSLPrincipal"
                        },
                        "clientHost": {
                            "type": "string"
                        },
                        "clientPort": {
                            "type": "integer"
                        },
                        "server": {
                            "$ref": "#/$defs/EvaluableSSLPrincipal"
                        }
                    }
                },
                "timestamp": {
                    "type": "integer"
                },
                "transactionId": {
                    "type": "string"
                },
                "uri": {
                    "type": "string"
                },
                "version": {
                    "type": "string"
                },
                "xmlContent": {
                    "$ref": "#/$defs/Map(String,Object)"
                }
            }
        },
        "response": {
            "type": "object",
            "properties": {
                "content": {
                    "type": "string"
                },
                "headers": {
                    "$ref": "#/$defs/HttpHeaders"
                },
                "jsonContent": {
                    "$ref": "#/$defs/Map(String,Object)"
                },
                "status": {
                    "type": "integer"
                },
                "xmlContent": {
                    "$ref": "#/$defs/Map(String,Object)"
                }
            }
        },
        "subscription": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "string"
                },
                "metadata": {
                    "$ref": "#/$defs/Map(String,String)",
                    "additionalProperties": {
                        "type": "string"
                    }
                },
                "type": {
                    "type": "string",
                    "enum": [
                        "STANDARD",
                        "PUSH"
                    ]
                }
            }
        }
    }
}

馃摎聽聽View the storybook of this branch here

@a-cordier a-cordier requested a review from a team as a code owner March 16, 2024 13:09
@a-cordier a-cordier force-pushed the feat-spel-grammar branch 6 times, most recently from 413c921 to fca16bb Compare March 16, 2024 13:32
@a-cordier a-cordier changed the title feat: add apim spel grammar module and endpoint feat: add apim el module and schema endpoint Mar 16, 2024
@a-cordier a-cordier changed the title feat: add apim el module and schema endpoint feat: add apim el module and apim el schema endpoint Mar 16, 2024
@a-cordier a-cordier force-pushed the feat-spel-grammar branch 7 times, most recently from 7a5de64 to a380629 Compare March 17, 2024 17:51
@a-cordier a-cordier marked this pull request as draft March 20, 2024 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant