code-discovery 0.2.3__tar.gz → 0.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {code_discovery-0.2.3 → code_discovery-0.3.0}/PKG-INFO +1 -1
- {code_discovery-0.2.3 → code_discovery-0.3.0}/setup.py +1 -1
- {code_discovery-0.2.3 → code_discovery-0.3.0}/src/code_discovery.egg-info/PKG-INFO +1 -1
- {code_discovery-0.2.3 → code_discovery-0.3.0}/src/detectors/base.py +0 -1
- {code_discovery-0.2.3 → code_discovery-0.3.0}/src/main.py +1 -1
- {code_discovery-0.2.3 → code_discovery-0.3.0}/src/utils/api_client.py +26 -11
- {code_discovery-0.2.3 → code_discovery-0.3.0}/.circleci/config.yml +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/.codediscovery.example.yml +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/.github/workflows/api-discovery.yml +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/.gitlab-ci.yml +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/.harness/api-discovery-pipeline.yml +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/CONTRIBUTING.md +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/Dockerfile +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/Jenkinsfile +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/LICENSE +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/MANIFEST.in +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/README.md +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/docker-compose.yml +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/requirements.txt +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/setup.cfg +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/src/code_discovery.egg-info/SOURCES.txt +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/src/code_discovery.egg-info/dependency_links.txt +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/src/code_discovery.egg-info/entry_points.txt +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/src/code_discovery.egg-info/requires.txt +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/src/code_discovery.egg-info/top_level.txt +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/src/core/__init__.py +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/src/core/models.py +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/src/core/orchestrator.py +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/src/detectors/__init__.py +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/src/detectors/dotnet.py +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/src/detectors/java_micronaut.py +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/src/detectors/java_spring.py +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/src/detectors/python_fastapi.py +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/src/detectors/python_flask.py +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/src/enrichers/__init__.py +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/src/enrichers/base.py +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/src/enrichers/dotnet_enricher.py +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/src/enrichers/endpoint_enricher.py +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/src/enrichers/java_micronaut_enricher.py +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/src/enrichers/java_spring_enricher.py +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/src/enrichers/python_fastapi_enricher.py +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/src/enrichers/python_flask_enricher.py +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/src/generators/__init__.py +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/src/generators/openapi_generator.py +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/src/parsers/__init__.py +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/src/parsers/base.py +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/src/parsers/dotnet_parser.py +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/src/parsers/fastapi_parser.py +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/src/parsers/flask_parser.py +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/src/parsers/java_micronaut_parser.py +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/src/parsers/java_spring_parser.py +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/src/utils/__init__.py +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/src/utils/apisec_config.py +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/src/utils/build_parsers.py +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/src/utils/config.py +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/src/utils/state_manager.py +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/src/vcs/__init__.py +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/src/vcs/base.py +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/src/vcs/circleci.py +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/src/vcs/factory.py +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/src/vcs/github.py +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/src/vcs/gitlab.py +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/src/vcs/harness.py +0 -0
- {code_discovery-0.2.3 → code_discovery-0.3.0}/src/vcs/jenkins.py +0 -0
|
@@ -22,7 +22,7 @@ dev_requirements = [
|
|
|
22
22
|
|
|
23
23
|
setup(
|
|
24
24
|
name="code-discovery",
|
|
25
|
-
version="0.
|
|
25
|
+
version="0.3.0",
|
|
26
26
|
author="Code Discovery Team",
|
|
27
27
|
author_email="team@codediscovery.dev",
|
|
28
28
|
description="Automatic API discovery system for multiple frameworks and VCS platforms",
|
|
@@ -322,7 +322,9 @@ class APIClient:
|
|
|
322
322
|
metadata: Optional[Dict[str, Any]] = None,
|
|
323
323
|
) -> str:
|
|
324
324
|
"""
|
|
325
|
-
Get application name from
|
|
325
|
+
Get application name from repository (VCS or path), then spec or fallback.
|
|
326
|
+
|
|
327
|
+
Prefers the repository name so the cloud platform application matches the repo.
|
|
326
328
|
|
|
327
329
|
Args:
|
|
328
330
|
openapi_spec: OpenAPI specification as dictionary.
|
|
@@ -331,16 +333,29 @@ class APIClient:
|
|
|
331
333
|
Returns:
|
|
332
334
|
str: Application name.
|
|
333
335
|
"""
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
336
|
+
import os
|
|
337
|
+
|
|
338
|
+
# Prefer repository name from VCS URL (e.g. from GitHub/GitLab CI)
|
|
339
|
+
if metadata and metadata.get("vcs", {}).get("repository_url"):
|
|
340
|
+
repo_url = metadata["vcs"]["repository_url"].rstrip("/")
|
|
341
|
+
if repo_url.endswith(".git"):
|
|
342
|
+
repo_url = repo_url[:-4]
|
|
343
|
+
name = repo_url.split("/")[-1]
|
|
344
|
+
if name:
|
|
345
|
+
return name
|
|
346
|
+
|
|
347
|
+
# Else use repository path basename (e.g. directory name when run locally)
|
|
348
|
+
if metadata and metadata.get("repository_path"):
|
|
349
|
+
raw = metadata["repository_path"].rstrip("/")
|
|
350
|
+
resolved = os.path.abspath(raw) if raw else ""
|
|
351
|
+
name = os.path.basename(resolved) if resolved else ""
|
|
352
|
+
if name and name != ".":
|
|
353
|
+
return name
|
|
354
|
+
|
|
355
|
+
# Fall back to OpenAPI spec title
|
|
356
|
+
if "info" in openapi_spec and openapi_spec["info"].get("title"):
|
|
357
|
+
return openapi_spec["info"]["title"]
|
|
358
|
+
|
|
344
359
|
return "discovered-api"
|
|
345
360
|
|
|
346
361
|
def _reload_spec(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{code_discovery-0.2.3 → code_discovery-0.3.0}/src/code_discovery.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|