🚀 Add 276 Auto-generated National Assembly APIs#27
Conversation
There was a problem hiding this comment.
Summary of Changes
Hello @StatPan, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request represents a major expansion of the assembly-ts library, integrating 276 new National Assembly APIs through an automated generation process. It introduces a unified OpenAPI class to provide type-safe and easily consumable access to these new endpoints, enhancing the library's utility and maintaining high code quality through automated testing and clear documentation.
Highlights
- New API Integration: Introduced 276 new, auto-generated National Assembly APIs, significantly expanding the library's coverage of public data from the Korean National Assembly.
- Unified OpenAPI Access: A new
OpenAPIclass has been added, providing a single, type-safe, and automatically parsable entry point to all 276 newly integrated APIs, simplifying their consumption. - Automated Generation Workflow: The addition of these APIs is part of an automated SDK generation process, managed by a GitHub Actions workflow (
auto-sdk-generation.yml), ensuring regular and consistent updates based on the source data. - Comprehensive Testing: New tests have been added to verify the correct generation and functionality of the
OpenAPIclass, including checks for the exact number of generated methods and their callability, alongside existing build and type checks. - Improved Documentation: The
README.mdhas been updated with clear usage examples for the newOpenAPIclass, demonstrating how to integrate it with existing library components.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
| import { OpenAPI } from '@leginote/assembly-ts'; | ||
|
|
||
| const openapi = new OpenAPI({ apiKey: 'key' }); | ||
| await openapi.법률안_심사_및_처리처리의안(params); |
There was a problem hiding this comment.
For the 법률안_심사_및_처리처리의안 example, consider providing a concrete example of the params variable to improve clarity for new users. This would help them understand how to pass parameters to the auto-generated methods.
| await openapi.법률안_심사_및_처리처리의안(params); | |
| await openapi.법률안_심사_및_처리처리의안({ BILL_NO: '2100001' }); |
| it('should call API methods without errors', async () => { | ||
| // 실제 API 호출 대신 mock 처리 | ||
| const mockResponse = { | ||
| head: { list_total_count: 100 }, | ||
| row: [{ id: 1, title: 'test' }] | ||
| }; | ||
|
|
||
| // 여기서는 메서드가 존재하는지만 확인 | ||
| expect(openapi.NATV_뉴스_의장단).toBeDefined(); | ||
| expect(openapi.의원친선협회_임회원_명단).toBeDefined(); | ||
| }); |
There was a problem hiding this comment.
The test should call API methods without errors only checks if the methods are defined, but doesn't verify if they correctly call the underlying callOpenApi function with the right arguments. Consider mocking callOpenApi and asserting it was called correctly to ensure the generated methods are wired up correctly.
it('should call NATV_뉴스_의장단 with correct parameters', async () => {
const callOpenApiSpy = vi.spyOn(openapi, 'NATV_뉴스_의장단');
const params = { COMP_MAIN_TITLE: 'test title' };
await openapi.NATV_뉴스_의장단(params);
expect(callOpenApiSpy).toHaveBeenCalled();
});
🚀 국회 API 자동 업데이트
생성일시: 2025-07-03 06:35:53 KST
생성된 API 개수: 276개
자동 생성: GitHub Actions workflow
📊 주요 변경사항
🔧 사용법
📋 자동생성된 주요 API 목록
🧪 테스트 결과
🤖 자동화 정보
이 PR은 GitHub Actions에 의해 자동으로 생성되었습니다.
auto-sdk-generation.yml🔍 상세 로그: GitHub Actions 실행 결과에서 확인 가능
📚 전체 API 목록:
src/openapi/functional.ts파일 참조