Open nraychaudhuri opened 9 months ago
Here's a way we can achieve that, how about parsing through the root file of build, to detect the dependencies:
# Determine the type of build file
if 'requirements.txt' in build_file_path:
dependencies = parse_requirements_file(build_file_path)
elif 'package.json' in build_file_path:
# Implement JSON parsing for package.json
pass
elif 'pom.xml' in build_file_path:
# Implement XML parsing for pom.xml
pass
elif 'build.gradle' in build_file_path:
# Implement Groovy parsing for build.gradle
pass
else:
print(f'Unsupported build file: {build_file_path}')
return
this type of code can parse through the all possible build, later on we can read the json or whatever format the project follow and give docs reference based on if the project is available or not
We can also check through an api endpoint say /api/docs
to check if documentation support are available or not in DocGenei
The idea of GGenie is to help developers with API documentation. To achieve that, we need to identify the project dependencies.
For example,
Genie should be smart enough for each case to load API documentation based on the version used and index it.
How can we do that?
One thought I have is to use the build file. There is a finite number of build files, and we can find a way to parse it and see all the dependencies with their version numbers. But how do we fetch documentation?
Is there a universal way to do that?