Skip to content

Commit

Permalink
AAP-36663: GenerationRoleResponseSerializer: fix two key names (#1458)
Browse files Browse the repository at this point in the history
Adjust the name of the keys used to return the role name and the file type.
  • Loading branch information
goneri authored Dec 11, 2024
1 parent adfb449 commit ec7e743
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions ansible_ai_connect/ai/api/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ class GenerationWarningResponseSerializer(serializers.Serializer):
class GenerationRoleFileEntrySerializer(serializers.Serializer):
path = serializers.CharField()
content = serializers.CharField()
fileType = serializers.CharField()
file_type = serializers.CharField()


class GenerationResponseSerializer(serializers.Serializer):
Expand All @@ -625,7 +625,7 @@ class GenerationResponseSerializer(serializers.Serializer):


class GenerationRoleResponseSerializer(serializers.Serializer):
name = serializers.CharField()
role = serializers.CharField(help_text=("Name of the role."))
files = serializers.ListField(child=GenerationRoleFileEntrySerializer())
generationId = serializers.UUIDField(
format="hex_verbose",
Expand Down
9 changes: 5 additions & 4 deletions tools/openapi-schema/ansible-ai-connect-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -988,11 +988,11 @@ components:
type: string
content:
type: string
fileType:
file_type:
type: string
required:
- content
- fileType
- file_type
- path
GenerationRoleRequest:
type: object
Expand Down Expand Up @@ -1045,8 +1045,9 @@ components:
GenerationRoleResponse:
type: object
properties:
name:
role:
type: string
description: Name of the role.
files:
type: array
items:
Expand All @@ -1065,8 +1066,8 @@ components:
$ref: '#/components/schemas/GenerationWarningResponse'
required:
- files
- name
- outline
- role
GenerationWarningResponse:
type: object
properties:
Expand Down

0 comments on commit ec7e743

Please sign in to comment.