Code Monkey home page Code Monkey logo

Comments (4)

aalu1418 avatar aalu1418 commented on July 24, 2024

Adding a few notes from some research on automated API documentation:

There seems to be a lot of tools converting from OAS to other readable formats:

  • https://openapi.tools/#documentation
  • Most generate complete webpages rather than a simple markdown file
  • A custom script could be used to create readme documentation from the OAS format?

On a different note, this could be used for autogenerating code documentation (probably not needed for EAs, but maybe in the bootstrap?)

from external-adapters-js.

aalu1418 avatar aalu1418 commented on July 24, 2024

Current configuration/tools:
Using swagger-jsdoc v6.x as a CLI tool to build OpenAPI spec from code comments.

Command to run (from root):

yarn docgen source coingecko

Example in the coingecko source adapter in the feature/autogen-docs branch.

Next tasks:

  • Generate definition.json file automatically for the adapter
  • Create proper documentation structure in jsdoc comments (check for inserting environment variable parameters)
  • Generate complete OAS spec for one repo (not sure it exactly follows OAS, but it is a somewhat standardized format)
  • Remove npx usage? (would speed up process when all files need to autogen docs)
  • Front-end visualization of documentation (converting OAS structure to hosted webpages?)

New things to consider:

  • Dynamically generating OAS by checking functions/variables in the EA?
  • Using jsonnet? (and/or using jsonnet to configure the EA - this requires a lot more revamp of EAs)

UPDATE: See Feautre/autogen-docs PR for the latest

from external-adapters-js.

aalu1418 avatar aalu1418 commented on July 24, 2024

New working branch: https://github.com/smartcontractkit/external-adapters-js/tree/feature/autogen-docs-2
Trying to pull parameters directly out of EAs

  • Pull endpoint parameters from ./endpoint/*.ts files
  • Pull possible endpoints from adapter.ts
  • Pull environment variables from config.ts

For full deployment, requires changes to existing EAs to export the necessary parameters

from external-adapters-js.

boxhock avatar boxhock commented on July 24, 2024

@austinborn is owning autogenerating documentation on separate stories now

from external-adapters-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.